Move platform/qt/fast/jsnavigator-language.html to fast/js
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 2 Jul 2012 05:21:57 +0000 (05:21 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 2 Jul 2012 05:21:57 +0000 (05:21 +0000)
https://bugs.webkit.org/show_bug.cgi?id=90261

Patch by Kihong Kwon <kihong.kwon@samsung.com> on 2012-07-01
Reviewed by Ryosuke Niwa.

Efl needs a test case for navigator.language.
This test case is modified for all ports.

* fast/js/navigator-language-expected.txt: Copied from LayoutTests/platform/qt/fast/js/navigator-language-expected.txt.
* fast/js/navigator-language.html: Copied from LayoutTests/platform/qt/fast/js/navigator-language.html.
* platform/qt/fast/js/navigator-language-expected.txt: Removed.
* platform/qt/fast/js/navigator-language.html: Removed.

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

LayoutTests/ChangeLog
LayoutTests/fast/js/navigator-language-expected.txt [new file with mode: 0644]
LayoutTests/fast/js/navigator-language.html [new file with mode: 0644]
LayoutTests/platform/qt/fast/js/navigator-language-expected.txt [deleted file]
LayoutTests/platform/qt/fast/js/navigator-language.html [deleted file]

index 044ff76..0015cea 100644 (file)
@@ -1,3 +1,18 @@
+2012-07-01  Kihong Kwon  <kihong.kwon@samsung.com>
+
+        Move platform/qt/fast/jsnavigator-language.html to fast/js
+        https://bugs.webkit.org/show_bug.cgi?id=90261
+
+        Reviewed by Ryosuke Niwa.
+
+        Efl needs a test case for navigator.language.
+        This test case is modified for all ports.
+
+        * fast/js/navigator-language-expected.txt: Copied from LayoutTests/platform/qt/fast/js/navigator-language-expected.txt.
+        * fast/js/navigator-language.html: Copied from LayoutTests/platform/qt/fast/js/navigator-language.html.
+        * platform/qt/fast/js/navigator-language-expected.txt: Removed.
+        * platform/qt/fast/js/navigator-language.html: Removed.
+
 2012-07-01  Keishi Hattori  <keishi@webkit.org>
 
        [Chromium] Fix TestExpectations error caused in r121652.
diff --git a/LayoutTests/fast/js/navigator-language-expected.txt b/LayoutTests/fast/js/navigator-language-expected.txt
new file mode 100644 (file)
index 0000000..3579d23
--- /dev/null
@@ -0,0 +1,9 @@
+Check return value of navigator.language.
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS language is 'en-us'
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/fast/js/navigator-language.html b/LayoutTests/fast/js/navigator-language.html
new file mode 100644 (file)
index 0000000..7bd56aa
--- /dev/null
@@ -0,0 +1,25 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script src="../../fast/js/resources/js-test-pre.js"></script>
+</head>
+<body>
+<script>
+description(
+    "<pre>Check return value of navigator.language."
+);
+
+if (window.layoutTestController) {
+    layoutTestController.dumpAsText();
+    layoutTestController.setPOSIXLocale("en_US.iso88591");
+}
+
+var language = navigator.language.toLowerCase();
+if (language.length == 2)
+    shouldBe("language", "'en'");
+else
+    shouldBe("language", "'en-us'");
+</script>
+<script src="../../fast/js/resources/js-test-post.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/platform/qt/fast/js/navigator-language-expected.txt b/LayoutTests/platform/qt/fast/js/navigator-language-expected.txt
deleted file mode 100644 (file)
index bcfea32..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-Test for bug 29653: [Qt] Qt-based browser fails to show the right language translation.
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-
-PASS navigator.language.toLowerCase() is 'en-us'
-PASS successfullyParsed is true
-
-TEST COMPLETE
-
diff --git a/LayoutTests/platform/qt/fast/js/navigator-language.html b/LayoutTests/platform/qt/fast/js/navigator-language.html
deleted file mode 100644 (file)
index 53d5763..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
-<html>
-<head>
-<script src="../../../../fast/js/resources/js-test-pre.js"></script>
-</head>
-<body>
-<!--
-Language tags should follow specification RFC5646:
-http://tools.ietf.org/html/rfc5646
-2.1.1.  Formatting of Language Tags
-
-   At all times, language tags and their subtags, including private use
-   and extensions, are to be treated as case insensitive: there exist
-   conventions for the capitalization of some of the subtags, but these
-   MUST NOT be taken to carry meaning.
--->
-<script>
-description(
-"<pre>Test for bug 29653: [Qt] Qt-based browser fails to show the right language translation."
-);
-
-if (window.layoutTestController) {
-    layoutTestController.dumpAsText();
-    layoutTestController.setPOSIXLocale("en_US.iso88591");
-}
-
-shouldBe("navigator.language.toLowerCase()", "'en-us'");
-</script>
-<script src="../../../../fast/js/resources/js-test-post.js"></script>
-</body>
-</html>