Reviewed by Shinichiro Hamaji.
https://bugs.webkit.org/show_bug.cgi?id=39606
Land tests for <rdar://problem/3277733>: \ in JavaScript mishandled when encoding is Japanese
* fast/encoding/resources/yentestexternal.js: Added.
* fast/encoding/resources/yentestexternal2.js: Added.
* fast/encoding/yentest-expected.txt: Added.
* fast/encoding/yentest.html: Added.
* fast/encoding/yentest2-expected.txt: Added.
* fast/encoding/yentest2.html: Added.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@60311 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 85e80b4..9c028bf 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,17 @@
+2010-05-27 Alexey Proskuryakov <ap@apple.com>
+
+ Reviewed by Shinichiro Hamaji.
+
+ https://bugs.webkit.org/show_bug.cgi?id=39606
+ Land tests for <rdar://problem/3277733>: \ in JavaScript mishandled when encoding is Japanese
+
+ * fast/encoding/resources/yentestexternal.js: Added.
+ * fast/encoding/resources/yentestexternal2.js: Added.
+ * fast/encoding/yentest-expected.txt: Added.
+ * fast/encoding/yentest.html: Added.
+ * fast/encoding/yentest2-expected.txt: Added.
+ * fast/encoding/yentest2.html: Added.
+
2010-05-27 Tony Gentilcore <tonyg@chromium.org>
Reviewed by Ojan Vafai.
diff --git a/LayoutTests/fast/encoding/resources/yentestexternal.js b/LayoutTests/fast/encoding/resources/yentestexternal.js
new file mode 100644
index 0000000..01262ea
--- /dev/null
+++ b/LayoutTests/fast/encoding/resources/yentestexternal.js
@@ -0,0 +1,4 @@
+function writeYenExternal()
+{
+ document.write("two backslashes external: " + "\\" + "<br>");
+}
diff --git a/LayoutTests/fast/encoding/resources/yentestexternal2.js b/LayoutTests/fast/encoding/resources/yentestexternal2.js
new file mode 100644
index 0000000..a6db72b
--- /dev/null
+++ b/LayoutTests/fast/encoding/resources/yentestexternal2.js
@@ -0,0 +1,5 @@
+function writeYenExternal()
+{
+ document.write("two backslashes external: \\ <br>");
+ document.write("one backslash external: \ <br>");
+}
diff --git a/LayoutTests/fast/encoding/yentest-expected.txt b/LayoutTests/fast/encoding/yentest-expected.txt
new file mode 100644
index 0000000..341a23a
--- /dev/null
+++ b/LayoutTests/fast/encoding/yentest-expected.txt
@@ -0,0 +1,3 @@
+two backslashes external: \
+two backslashes inline: \
+
diff --git a/LayoutTests/fast/encoding/yentest.html b/LayoutTests/fast/encoding/yentest.html
new file mode 100644
index 0000000..a3a2a17
--- /dev/null
+++ b/LayoutTests/fast/encoding/yentest.html
@@ -0,0 +1,15 @@
+<HTML>
+<HEAD>
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=shift-jis">
+<script src="resources/yentestexternal.js" type="text/javascript"></script>
+</HEAD>
+<BODY>
+<script>
+if (window.layoutTestController)
+ layoutTestController.dumpAsText();
+
+writeYenExternal();
+document.write("two backslashes inline: " + "\\" + "<br>");
+</script>
+</body>
+</html>
diff --git a/LayoutTests/fast/encoding/yentest2-expected.txt b/LayoutTests/fast/encoding/yentest2-expected.txt
new file mode 100644
index 0000000..95557a3
--- /dev/null
+++ b/LayoutTests/fast/encoding/yentest2-expected.txt
@@ -0,0 +1,5 @@
+two backslashes external: \
+one backslash external:
+two backslashes inline: \
+one backslash inline:
+
diff --git a/LayoutTests/fast/encoding/yentest2.html b/LayoutTests/fast/encoding/yentest2.html
new file mode 100644
index 0000000..132069c
--- /dev/null
+++ b/LayoutTests/fast/encoding/yentest2.html
@@ -0,0 +1,16 @@
+<HTML>
+<HEAD>
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=shift-jis">
+<script src="resources/yentestexternal2.js" type="text/javascript"></script>
+</HEAD>
+<BODY>
+<script>
+if (window.layoutTestController)
+ layoutTestController.dumpAsText();
+
+writeYenExternal();
+document.write("two backslashes inline: \\ <br>");
+document.write("one backslash inline: \ <br>");
+</script>
+</body>
+</html>