UTF-8 auto-detection tests. Bug 811363
authorSimon Montagu <smontagu@smontagu.org>
Fri, 16 Nov 2012 11:33:12 -0800
changeset 122183 c5c9d7951b47b72155da3b0fc8b7af45c14b5898
parent 122182 25831c0daacd869302cba587596770eec0f62cd9
child 122184 2366a926ad3cc170b1a8c8d1caeaa69ff0d2ae0e
push id273
push userlsblakk@mozilla.com
push dateThu, 14 Feb 2013 23:19:38 +0000
treeherdermozilla-release@c5e807a3f8b8 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs811363
milestone19.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
UTF-8 auto-detection tests. Bug 811363
extensions/universalchardet/tests/Makefile.in
extensions/universalchardet/tests/bug811363-1.text
extensions/universalchardet/tests/bug811363-2.text
extensions/universalchardet/tests/bug811363-3.text
extensions/universalchardet/tests/bug811363-4.text
extensions/universalchardet/tests/bug811363-5.text
extensions/universalchardet/tests/bug811363-6.text
extensions/universalchardet/tests/bug811363-7.text
extensions/universalchardet/tests/bug811363-8.text
extensions/universalchardet/tests/bug811363-9.text
extensions/universalchardet/tests/bug811363-invalid-1.text
extensions/universalchardet/tests/bug811363-invalid-2.text
extensions/universalchardet/tests/bug811363-invalid-3.text
extensions/universalchardet/tests/bug811363-invalid-4.text
extensions/universalchardet/tests/bug811363-invalid-5.text
extensions/universalchardet/tests/test_bug811363-1-1.html
extensions/universalchardet/tests/test_bug811363-1-2.html
extensions/universalchardet/tests/test_bug811363-1-3.html
extensions/universalchardet/tests/test_bug811363-1-4.html
extensions/universalchardet/tests/test_bug811363-1-5.html
extensions/universalchardet/tests/test_bug811363-2-1.html
extensions/universalchardet/tests/test_bug811363-2-2.html
extensions/universalchardet/tests/test_bug811363-2-3.html
extensions/universalchardet/tests/test_bug811363-2-4.html
extensions/universalchardet/tests/test_bug811363-2-5.html
extensions/universalchardet/tests/test_bug811363-2-6.html
extensions/universalchardet/tests/test_bug811363-2-7.html
extensions/universalchardet/tests/test_bug811363-2-8.html
extensions/universalchardet/tests/test_bug811363-2-9.html
--- a/extensions/universalchardet/tests/Makefile.in
+++ b/extensions/universalchardet/tests/Makefile.in
@@ -36,11 +36,39 @@ MOCHITEST_CHROME_FILES =	\
 		bug620106_text.html \
 		test_bug620106.html \
 		bug631751le_text.html \
 		test_bug631751le.html \
 		bug631751be_text.html \
 		test_bug631751be.html \
 		bug638318_text.html \
 		test_bug638318.html \
+		bug811363-1.text \
+		bug811363-2.text \
+		bug811363-3.text \
+		bug811363-4.text \
+		bug811363-5.text \
+		bug811363-6.text \
+		bug811363-7.text \
+		bug811363-8.text \
+		bug811363-9.text \
+		bug811363-invalid-1.text \
+		bug811363-invalid-2.text \
+		bug811363-invalid-3.text \
+		bug811363-invalid-4.text \
+		bug811363-invalid-5.text \
+		test_bug811363-1-1.html \
+		test_bug811363-1-2.html \
+		test_bug811363-1-3.html \
+		test_bug811363-1-4.html \
+		test_bug811363-1-5.html \
+		test_bug811363-2-1.html \
+		test_bug811363-2-2.html \
+		test_bug811363-2-3.html \
+		test_bug811363-2-4.html \
+		test_bug811363-2-5.html \
+		test_bug811363-2-6.html \
+		test_bug811363-2-7.html \
+		test_bug811363-2-8.html \
+		test_bug811363-2-9.html \
 		$(NULL)
 
 include $(topsrcdir)/config/rules.mk
new file mode 100644
--- /dev/null
+++ b/extensions/universalchardet/tests/bug811363-1.text
@@ -0,0 +1,1 @@
+Two-byte UTF-8 including the first and last characters in the range: €Шерлок߿
new file mode 100644
--- /dev/null
+++ b/extensions/universalchardet/tests/bug811363-2.text
@@ -0,0 +1,3 @@
+Three byte UTF-8, first byte 0xE0, including first and last characters
+in the range: ࠀशर्लक࿿
+
new file mode 100644
--- /dev/null
+++ b/extensions/universalchardet/tests/bug811363-3.text
@@ -0,0 +1,3 @@
+Three byte UTF-8, first byte 0xE1-EC, including first and last characters
+in the range: ကシャーロック쿿
+
new file mode 100644
--- /dev/null
+++ b/extensions/universalchardet/tests/bug811363-4.text
@@ -0,0 +1,3 @@
+Three byte UTF-8, first byte 0xED, including first and last characters
+in the range: 퀀홈하홈탐퟿
+
new file mode 100644
--- /dev/null
+++ b/extensions/universalchardet/tests/bug811363-5.text
@@ -0,0 +1,3 @@
+Three byte UTF-8, first byte 0xEE-EF, including first and last characters
+in the range: ﴍﻟﻮﻙ￿
+
new file mode 100644
--- /dev/null
+++ b/extensions/universalchardet/tests/bug811363-6.text
@@ -0,0 +1,3 @@
+Four byte UTF-8, first byte 0xF0, including first and last characters
+in the range: 𐀀𐌲𐌿𐍄𐌹𐍃𐌺 𿿿
+
new file mode 100644
--- /dev/null
+++ b/extensions/universalchardet/tests/bug811363-7.text
@@ -0,0 +1,3 @@
+Four byte UTF-8, first byte 0xF1-F3, including first and last characters
+in the range: 񀀀񠀀 񠀁 񠀂󿿿
+
new file mode 100644
--- /dev/null
+++ b/extensions/universalchardet/tests/bug811363-8.text
@@ -0,0 +1,3 @@
+Four byte UTF-8, first byte 0xF4, including first and last characters
+in the range:􀀀􈀀 􈀁 􈀂􏿿
+
new file mode 100644
--- /dev/null
+++ b/extensions/universalchardet/tests/bug811363-9.text
@@ -0,0 +1,2 @@
+Four byte UTF-8, first byte 0xF0, including BMP only:𐤔𐤓𐤋𐤅𐤒
+
new file mode 100644
--- /dev/null
+++ b/extensions/universalchardet/tests/bug811363-invalid-1.text
@@ -0,0 +1,4 @@
+Orphaned continuation bytes: 
+
+
+
new file mode 100644
--- /dev/null
+++ b/extensions/universalchardet/tests/bug811363-invalid-2.text
@@ -0,0 +1,3 @@
+First bytes of 2-byte sequences (0xc0-0xdf), each followed by a space character:                                 
+First bytes of 3-byte sequences (0xe0-0xef), each followed by a space character:                 
+First bytes of 4-byte sequences (0xf0-0xf4), each followed by a space character:      
new file mode 100644
--- /dev/null
+++ b/extensions/universalchardet/tests/bug811363-invalid-3.text
@@ -0,0 +1,2 @@
+3-byte sequence with last byte missing (U+0000): 
+4-byte sequence with last b0te missing (U+0000): 
new file mode 100644
--- /dev/null
+++ b/extensions/universalchardet/tests/bug811363-invalid-4.text
@@ -0,0 +1,1 @@
+Overlong encodings:   
new file mode 100644
--- /dev/null
+++ b/extensions/universalchardet/tests/bug811363-invalid-5.text
@@ -0,0 +1,3 @@
+Isolated surrogates:  
+Surrogate pairs:  
+
new file mode 100644
--- /dev/null
+++ b/extensions/universalchardet/tests/test_bug811363-1-1.html
@@ -0,0 +1,35 @@
+<!DOCTYPE HTML>
+<html>
+<!--
+https://bugzilla.mozilla.org/show_bug.cgi?id=811363
+-->
+<head>
+  <title>Test for Bug 811363</title>
+  <script type="text/javascript"
+          src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js">
+          </script>
+  <script type="text/javascript" src="CharsetDetectionTests.js"></script>
+  <link rel="stylesheet" type="text/css"
+        href="chrome://mochikit/content/tests/SimpleTest/test.css" />
+</head>
+<body>
+<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=811363">Mozilla Bug 811363</a>
+<p id="display"></p>
+<div id="content" style="display: none">
+</div>
+<iframe id="testframe"></iframe>
+<pre id="test">
+<script class="testbody" type="text/javascript">
+/** Test for Bug 811363 **/
+CharsetDetectionTests("bug811363-invalid-1.text",
+		      "ISO-8859-1",
+		      new Array("ja_parallel_state_machine",
+				"zh_parallel_state_machine",
+				"zhtw_parallel_state_machine",
+				"zhcn_parallel_state_machine",
+				"cjk_parallel_state_machine",
+				"universal_charset_detector"));
+</script>
+</pre>
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/extensions/universalchardet/tests/test_bug811363-1-2.html
@@ -0,0 +1,35 @@
+<!DOCTYPE HTML>
+<html>
+<!--
+https://bugzilla.mozilla.org/show_bug.cgi?id=811363
+-->
+<head>
+  <title>Test for Bug 811363</title>
+  <script type="text/javascript"
+          src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js">
+          </script>
+  <script type="text/javascript" src="CharsetDetectionTests.js"></script>
+  <link rel="stylesheet" type="text/css"
+        href="chrome://mochikit/content/tests/SimpleTest/test.css" />
+</head>
+<body>
+<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=811363">Mozilla Bug 811363</a>
+<p id="display"></p>
+<div id="content" style="display: none">
+</div>
+<iframe id="testframe"></iframe>
+<pre id="test">
+<script class="testbody" type="text/javascript">
+/** Test for Bug 811363 **/
+CharsetDetectionTests("bug811363-invalid-2.text",
+		      "windows-1252",
+		      new Array("ja_parallel_state_machine",
+				"zh_parallel_state_machine",
+				"zhtw_parallel_state_machine",
+				"zhcn_parallel_state_machine",
+				"cjk_parallel_state_machine",
+				"universal_charset_detector"));
+</script>
+</pre>
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/extensions/universalchardet/tests/test_bug811363-1-3.html
@@ -0,0 +1,35 @@
+<!DOCTYPE HTML>
+<html>
+<!--
+https://bugzilla.mozilla.org/show_bug.cgi?id=811363
+-->
+<head>
+  <title>Test for Bug 811363</title>
+  <script type="text/javascript"
+          src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js">
+          </script>
+  <script type="text/javascript" src="CharsetDetectionTests.js"></script>
+  <link rel="stylesheet" type="text/css"
+        href="chrome://mochikit/content/tests/SimpleTest/test.css" />
+</head>
+<body>
+<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=811363">Mozilla Bug 811363</a>
+<p id="display"></p>
+<div id="content" style="display: none">
+</div>
+<iframe id="testframe"></iframe>
+<pre id="test">
+<script class="testbody" type="text/javascript">
+/** Test for Bug 811363 **/
+CharsetDetectionTests("bug811363-invalid-3.text",
+		      "windows-1252",
+		      new Array("ja_parallel_state_machine",
+				"zh_parallel_state_machine",
+				"zhtw_parallel_state_machine",
+				"zhcn_parallel_state_machine",
+				"cjk_parallel_state_machine",
+				"universal_charset_detector"));
+</script>
+</pre>
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/extensions/universalchardet/tests/test_bug811363-1-4.html
@@ -0,0 +1,35 @@
+<!DOCTYPE HTML>
+<html>
+<!--
+https://bugzilla.mozilla.org/show_bug.cgi?id=811363
+-->
+<head>
+  <title>Test for Bug 811363</title>
+  <script type="text/javascript"
+          src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js">
+          </script>
+  <script type="text/javascript" src="CharsetDetectionTests.js"></script>
+  <link rel="stylesheet" type="text/css"
+        href="chrome://mochikit/content/tests/SimpleTest/test.css" />
+</head>
+<body>
+<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=811363">Mozilla Bug 811363</a>
+<p id="display"></p>
+<div id="content" style="display: none">
+</div>
+<iframe id="testframe"></iframe>
+<pre id="test">
+<script class="testbody" type="text/javascript">
+/** Test for Bug 811363 **/
+CharsetDetectionTests("bug811363-invalid-4.text",
+		      "windows-1252",
+		      new Array("ja_parallel_state_machine",
+				"zh_parallel_state_machine",
+				"zhtw_parallel_state_machine",
+				"zhcn_parallel_state_machine",
+				"cjk_parallel_state_machine",
+				"universal_charset_detector"));
+</script>
+</pre>
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/extensions/universalchardet/tests/test_bug811363-1-5.html
@@ -0,0 +1,35 @@
+<!DOCTYPE HTML>
+<html>
+<!--
+https://bugzilla.mozilla.org/show_bug.cgi?id=811363
+-->
+<head>
+  <title>Test for Bug 811363</title>
+  <script type="text/javascript"
+          src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js">
+          </script>
+  <script type="text/javascript" src="CharsetDetectionTests.js"></script>
+  <link rel="stylesheet" type="text/css"
+        href="chrome://mochikit/content/tests/SimpleTest/test.css" />
+</head>
+<body>
+<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=811363">Mozilla Bug 811363</a>
+<p id="display"></p>
+<div id="content" style="display: none">
+</div>
+<iframe id="testframe"></iframe>
+<pre id="test">
+<script class="testbody" type="text/javascript">
+/** Test for Bug 811363 **/
+CharsetDetectionTests("bug811363-invalid-5.text",
+		      "ISO-8859-1",
+		      new Array("ja_parallel_state_machine",
+				"zh_parallel_state_machine",
+				"zhtw_parallel_state_machine",
+				"zhcn_parallel_state_machine",
+				"cjk_parallel_state_machine",
+				"universal_charset_detector"));
+</script>
+</pre>
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/extensions/universalchardet/tests/test_bug811363-2-1.html
@@ -0,0 +1,35 @@
+<!DOCTYPE HTML>
+<html>
+<!--
+https://bugzilla.mozilla.org/show_bug.cgi?id=811363
+-->
+<head>
+  <title>Test for Bug 811363</title>
+  <script type="text/javascript"
+          src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js">
+          </script>
+  <script type="text/javascript" src="CharsetDetectionTests.js"></script>
+  <link rel="stylesheet" type="text/css"
+        href="chrome://mochikit/content/tests/SimpleTest/test.css" />
+</head>
+<body>
+<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=811363">Mozilla Bug 811363</a>
+<p id="display"></p>
+<div id="content" style="display: none">
+</div>
+<iframe id="testframe"></iframe>
+<pre id="test">
+<script class="testbody" type="text/javascript">
+/** Test for Bug 811363 **/
+CharsetDetectionTests("bug811363-1.text",
+		      "UTF-8",
+		      new Array("ja_parallel_state_machine",
+				"zh_parallel_state_machine",
+				"zhtw_parallel_state_machine",
+				"zhcn_parallel_state_machine",
+				"cjk_parallel_state_machine",
+				"universal_charset_detector"));
+</script>
+</pre>
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/extensions/universalchardet/tests/test_bug811363-2-2.html
@@ -0,0 +1,35 @@
+<!DOCTYPE HTML>
+<html>
+<!--
+https://bugzilla.mozilla.org/show_bug.cgi?id=811363
+-->
+<head>
+  <title>Test for Bug 811363</title>
+  <script type="text/javascript"
+          src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js">
+          </script>
+  <script type="text/javascript" src="CharsetDetectionTests.js"></script>
+  <link rel="stylesheet" type="text/css"
+        href="chrome://mochikit/content/tests/SimpleTest/test.css" />
+</head>
+<body>
+<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=811363">Mozilla Bug 811363</a>
+<p id="display"></p>
+<div id="content" style="display: none">
+</div>
+<iframe id="testframe"></iframe>
+<pre id="test">
+<script class="testbody" type="text/javascript">
+/** Test for Bug 811363 **/
+CharsetDetectionTests("bug811363-2.text",
+		      "UTF-8",
+		      new Array("ja_parallel_state_machine",
+				"zh_parallel_state_machine",
+				"zhtw_parallel_state_machine",
+				"zhcn_parallel_state_machine",
+				"cjk_parallel_state_machine",
+				"universal_charset_detector"));
+</script>
+</pre>
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/extensions/universalchardet/tests/test_bug811363-2-3.html
@@ -0,0 +1,35 @@
+<!DOCTYPE HTML>
+<html>
+<!--
+https://bugzilla.mozilla.org/show_bug.cgi?id=811363
+-->
+<head>
+  <title>Test for Bug 811363</title>
+  <script type="text/javascript"
+          src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js">
+          </script>
+  <script type="text/javascript" src="CharsetDetectionTests.js"></script>
+  <link rel="stylesheet" type="text/css"
+        href="chrome://mochikit/content/tests/SimpleTest/test.css" />
+</head>
+<body>
+<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=811363">Mozilla Bug 811363</a>
+<p id="display"></p>
+<div id="content" style="display: none">
+</div>
+<iframe id="testframe"></iframe>
+<pre id="test">
+<script class="testbody" type="text/javascript">
+/** Test for Bug 811363 **/
+CharsetDetectionTests("bug811363-3.text",
+		      "UTF-8",
+		      new Array("ja_parallel_state_machine",
+				"zh_parallel_state_machine",
+				"zhtw_parallel_state_machine",
+				"zhcn_parallel_state_machine",
+				"cjk_parallel_state_machine",
+				"universal_charset_detector"));
+</script>
+</pre>
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/extensions/universalchardet/tests/test_bug811363-2-4.html
@@ -0,0 +1,35 @@
+<!DOCTYPE HTML>
+<html>
+<!--
+https://bugzilla.mozilla.org/show_bug.cgi?id=811363
+-->
+<head>
+  <title>Test for Bug 811363</title>
+  <script type="text/javascript"
+          src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js">
+          </script>
+  <script type="text/javascript" src="CharsetDetectionTests.js"></script>
+  <link rel="stylesheet" type="text/css"
+        href="chrome://mochikit/content/tests/SimpleTest/test.css" />
+</head>
+<body>
+<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=811363">Mozilla Bug 811363</a>
+<p id="display"></p>
+<div id="content" style="display: none">
+</div>
+<iframe id="testframe"></iframe>
+<pre id="test">
+<script class="testbody" type="text/javascript">
+/** Test for Bug 811363 **/
+CharsetDetectionTests("bug811363-4.text",
+		      "UTF-8",
+		      new Array("ja_parallel_state_machine",
+				"zh_parallel_state_machine",
+				"zhtw_parallel_state_machine",
+				"zhcn_parallel_state_machine",
+				"cjk_parallel_state_machine",
+				"universal_charset_detector"));
+</script>
+</pre>
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/extensions/universalchardet/tests/test_bug811363-2-5.html
@@ -0,0 +1,35 @@
+<!DOCTYPE HTML>
+<html>
+<!--
+https://bugzilla.mozilla.org/show_bug.cgi?id=811363
+-->
+<head>
+  <title>Test for Bug 811363</title>
+  <script type="text/javascript"
+          src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js">
+          </script>
+  <script type="text/javascript" src="CharsetDetectionTests.js"></script>
+  <link rel="stylesheet" type="text/css"
+        href="chrome://mochikit/content/tests/SimpleTest/test.css" />
+</head>
+<body>
+<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=811363">Mozilla Bug 811363</a>
+<p id="display"></p>
+<div id="content" style="display: none">
+</div>
+<iframe id="testframe"></iframe>
+<pre id="test">
+<script class="testbody" type="text/javascript">
+/** Test for Bug 811363 **/
+CharsetDetectionTests("bug811363-5.text",
+		      "UTF-8",
+		      new Array("ja_parallel_state_machine",
+				"zh_parallel_state_machine",
+				"zhtw_parallel_state_machine",
+				"zhcn_parallel_state_machine",
+				"cjk_parallel_state_machine",
+				"universal_charset_detector"));
+</script>
+</pre>
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/extensions/universalchardet/tests/test_bug811363-2-6.html
@@ -0,0 +1,35 @@
+<!DOCTYPE HTML>
+<html>
+<!--
+https://bugzilla.mozilla.org/show_bug.cgi?id=811363
+-->
+<head>
+  <title>Test for Bug 811363</title>
+  <script type="text/javascript"
+          src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js">
+          </script>
+  <script type="text/javascript" src="CharsetDetectionTests.js"></script>
+  <link rel="stylesheet" type="text/css"
+        href="chrome://mochikit/content/tests/SimpleTest/test.css" />
+</head>
+<body>
+<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=811363">Mozilla Bug 811363</a>
+<p id="display"></p>
+<div id="content" style="display: none">
+</div>
+<iframe id="testframe"></iframe>
+<pre id="test">
+<script class="testbody" type="text/javascript">
+/** Test for Bug 811363 **/
+CharsetDetectionTests("bug811363-6.text",
+		      "UTF-8",
+		      new Array("ja_parallel_state_machine",
+				"zh_parallel_state_machine",
+				"zhtw_parallel_state_machine",
+				"zhcn_parallel_state_machine",
+				"cjk_parallel_state_machine",
+				"universal_charset_detector"));
+</script>
+</pre>
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/extensions/universalchardet/tests/test_bug811363-2-7.html
@@ -0,0 +1,35 @@
+<!DOCTYPE HTML>
+<html>
+<!--
+https://bugzilla.mozilla.org/show_bug.cgi?id=811363
+-->
+<head>
+  <title>Test for Bug 811363</title>
+  <script type="text/javascript"
+          src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js">
+          </script>
+  <script type="text/javascript" src="CharsetDetectionTests.js"></script>
+  <link rel="stylesheet" type="text/css"
+        href="chrome://mochikit/content/tests/SimpleTest/test.css" />
+</head>
+<body>
+<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=811363">Mozilla Bug 811363</a>
+<p id="display"></p>
+<div id="content" style="display: none">
+</div>
+<iframe id="testframe"></iframe>
+<pre id="test">
+<script class="testbody" type="text/javascript">
+/** Test for Bug 811363 **/
+CharsetDetectionTests("bug811363-7.text",
+		      "UTF-8",
+		      new Array("ja_parallel_state_machine",
+				"zh_parallel_state_machine",
+				"zhtw_parallel_state_machine",
+				"zhcn_parallel_state_machine",
+				"cjk_parallel_state_machine",
+				"universal_charset_detector"));
+</script>
+</pre>
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/extensions/universalchardet/tests/test_bug811363-2-8.html
@@ -0,0 +1,35 @@
+<!DOCTYPE HTML>
+<html>
+<!--
+https://bugzilla.mozilla.org/show_bug.cgi?id=811363
+-->
+<head>
+  <title>Test for Bug 811363</title>
+  <script type="text/javascript"
+          src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js">
+          </script>
+  <script type="text/javascript" src="CharsetDetectionTests.js"></script>
+  <link rel="stylesheet" type="text/css"
+        href="chrome://mochikit/content/tests/SimpleTest/test.css" />
+</head>
+<body>
+<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=811363">Mozilla Bug 811363</a>
+<p id="display"></p>
+<div id="content" style="display: none">
+</div>
+<iframe id="testframe"></iframe>
+<pre id="test">
+<script class="testbody" type="text/javascript">
+/** Test for Bug 811363 **/
+CharsetDetectionTests("bug811363-8.text",
+		      "UTF-8",
+		      new Array("ja_parallel_state_machine",
+				"zh_parallel_state_machine",
+				"zhtw_parallel_state_machine",
+				"zhcn_parallel_state_machine",
+				"cjk_parallel_state_machine",
+				"universal_charset_detector"));
+</script>
+</pre>
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/extensions/universalchardet/tests/test_bug811363-2-9.html
@@ -0,0 +1,35 @@
+<!DOCTYPE HTML>
+<html>
+<!--
+https://bugzilla.mozilla.org/show_bug.cgi?id=811363
+-->
+<head>
+  <title>Test for Bug 811363</title>
+  <script type="text/javascript"
+          src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js">
+          </script>
+  <script type="text/javascript" src="CharsetDetectionTests.js"></script>
+  <link rel="stylesheet" type="text/css"
+        href="chrome://mochikit/content/tests/SimpleTest/test.css" />
+</head>
+<body>
+<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=811363">Mozilla Bug 811363</a>
+<p id="display"></p>
+<div id="content" style="display: none">
+</div>
+<iframe id="testframe"></iframe>
+<pre id="test">
+<script class="testbody" type="text/javascript">
+/** Test for Bug 811363 **/
+CharsetDetectionTests("bug811363-9.text",
+		      "UTF-8",
+		      new Array("ja_parallel_state_machine",
+				"zh_parallel_state_machine",
+				"zhtw_parallel_state_machine",
+				"zhcn_parallel_state_machine",
+				"cjk_parallel_state_machine",
+				"universal_charset_detector"));
+</script>
+</pre>
+</body>
+</html>