Add tests for different Unicode normalization forms in domain names
authorap@apple.com <ap@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 4 Sep 2015 17:43:49 +0000 (17:43 +0000)
committerap@apple.com <ap@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 4 Sep 2015 17:43:49 +0000 (17:43 +0000)
https://bugs.webkit.org/show_bug.cgi?id=148762
<rdar://problem/22569933>

Reviewed by Darin Adler.

* fast/url/user-visible/cyrillic-NFD-expected.txt: Added.
* fast/url/user-visible/cyrillic-NFD.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@189356 268f45cc-cd09-0410-ab3c-d52691b4dbfc

LayoutTests/ChangeLog
LayoutTests/fast/url/user-visible/cyrillic-NFD-expected.txt [new file with mode: 0644]
LayoutTests/fast/url/user-visible/cyrillic-NFD.html [new file with mode: 0644]

index 3bc1b01..d32008a 100644 (file)
@@ -1,3 +1,14 @@
+2015-09-04  Alexey Proskuryakov  <ap@apple.com>
+
+        Add tests for different Unicode normalization forms in domain names
+        https://bugs.webkit.org/show_bug.cgi?id=148762
+        <rdar://problem/22569933>
+
+        Reviewed by Darin Adler.
+
+        * fast/url/user-visible/cyrillic-NFD-expected.txt: Added.
+        * fast/url/user-visible/cyrillic-NFD.html: Added.
+
 2015-09-04  Chris Dumez  <cdumez@apple.com>
 
         Document.body should return the first body / frameset child of the html element
diff --git a/LayoutTests/fast/url/user-visible/cyrillic-NFD-expected.txt b/LayoutTests/fast/url/user-visible/cyrillic-NFD-expected.txt
new file mode 100644 (file)
index 0000000..9f1d109
--- /dev/null
@@ -0,0 +1,11 @@
+Test IDN behavior decomposed forms of Cyrillic domain name tags.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS test('http://спецодежда.онлайн/') is 'http://спецодежда.онлайн/'
+PASS test('http://спецодежда.онлайн/') is 'http://спецодежда.онлайн/'
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/fast/url/user-visible/cyrillic-NFD.html b/LayoutTests/fast/url/user-visible/cyrillic-NFD.html
new file mode 100644 (file)
index 0000000..8197271
--- /dev/null
@@ -0,0 +1,24 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<script src="../../../resources/js-test-pre.js"></script>
+</head>
+<body>
+<script>
+
+description("Test IDN behavior decomposed forms of Cyrillic domain name tags.");
+
+function test(url)
+{
+    var domURL = new URL(url);
+    return internals.userVisibleString(domURL);
+}
+
+shouldBe("test('http://спецодежда.онла\u0439н/')", "'http://спецодежда.онлайн/'");
+shouldBe("test('http://спецодежда.онла\u0438\u0306н/')", "'http://спецодежда.онлайн/'");
+
+</script>
+<script src="../../../resources/js-test-post.js"></script>
+</body>
+</html>