summaryrefslogtreecommitdiffstats
path: root/extensions/universalchardet/tests
diff options
context:
space:
mode:
Diffstat (limited to 'extensions/universalchardet/tests')
-rw-r--r--extensions/universalchardet/tests/CharsetDetectionTests.js94
-rw-r--r--extensions/universalchardet/tests/bug306272_text.html9
-rw-r--r--extensions/universalchardet/tests/bug421271_text.html5
-rw-r--r--extensions/universalchardet/tests/bug426271_text-euc-jp.html11
-rw-r--r--extensions/universalchardet/tests/bug426271_text-utf-8.html11
-rw-r--r--extensions/universalchardet/tests/bug431054_text.html5
-rw-r--r--extensions/universalchardet/tests/bug547487_text.html1
-rw-r--r--extensions/universalchardet/tests/bug620106_text.html1045
-rw-r--r--extensions/universalchardet/tests/bug631751be_text.htmlbin0 -> 354 bytes
-rw-r--r--extensions/universalchardet/tests/bug631751le_text.htmlbin0 -> 366 bytes
-rw-r--r--extensions/universalchardet/tests/bug638318_text.htmlbin0 -> 1108 bytes
-rw-r--r--extensions/universalchardet/tests/bug811363-1.text1
-rw-r--r--extensions/universalchardet/tests/bug811363-2.text3
-rw-r--r--extensions/universalchardet/tests/bug811363-3.text3
-rw-r--r--extensions/universalchardet/tests/bug811363-4.text3
-rw-r--r--extensions/universalchardet/tests/bug811363-5.text3
-rw-r--r--extensions/universalchardet/tests/bug811363-6.text3
-rw-r--r--extensions/universalchardet/tests/bug811363-7.text3
-rw-r--r--extensions/universalchardet/tests/bug811363-8.text3
-rw-r--r--extensions/universalchardet/tests/bug811363-9.text2
-rw-r--r--extensions/universalchardet/tests/bug811363-invalid-1.text4
-rw-r--r--extensions/universalchardet/tests/bug811363-invalid-2.text3
-rw-r--r--extensions/universalchardet/tests/bug811363-invalid-3.text2
-rw-r--r--extensions/universalchardet/tests/bug811363-invalid-4.text1
-rw-r--r--extensions/universalchardet/tests/bug811363-invalid-5.text3
-rw-r--r--extensions/universalchardet/tests/chrome.ini52
-rw-r--r--extensions/universalchardet/tests/moz.build8
-rw-r--r--extensions/universalchardet/tests/test_bug306272.html31
-rw-r--r--extensions/universalchardet/tests/test_bug421271.html37
-rw-r--r--extensions/universalchardet/tests/test_bug426271-euc-jp.html31
-rw-r--r--extensions/universalchardet/tests/test_bug426271-utf-8.html32
-rw-r--r--extensions/universalchardet/tests/test_bug431054-japanese.html30
-rw-r--r--extensions/universalchardet/tests/test_bug431054.html34
-rw-r--r--extensions/universalchardet/tests/test_bug547487.html36
-rw-r--r--extensions/universalchardet/tests/test_bug631751be.html31
-rw-r--r--extensions/universalchardet/tests/test_bug631751le.html31
-rw-r--r--extensions/universalchardet/tests/test_bug638318.html31
-rw-r--r--extensions/universalchardet/tests/test_bug811363-1-1.html30
-rw-r--r--extensions/universalchardet/tests/test_bug811363-1-2.html30
-rw-r--r--extensions/universalchardet/tests/test_bug811363-1-3.html30
-rw-r--r--extensions/universalchardet/tests/test_bug811363-1-4.html30
-rw-r--r--extensions/universalchardet/tests/test_bug811363-1-5.html30
-rw-r--r--extensions/universalchardet/tests/test_bug811363-2-1.html30
-rw-r--r--extensions/universalchardet/tests/test_bug811363-2-2.html30
-rw-r--r--extensions/universalchardet/tests/test_bug811363-2-3.html30
-rw-r--r--extensions/universalchardet/tests/test_bug811363-2-4.html30
-rw-r--r--extensions/universalchardet/tests/test_bug811363-2-5.html30
-rw-r--r--extensions/universalchardet/tests/test_bug811363-2-6.html30
-rw-r--r--extensions/universalchardet/tests/test_bug811363-2-7.html30
-rw-r--r--extensions/universalchardet/tests/test_bug811363-2-8.html30
-rw-r--r--extensions/universalchardet/tests/test_bug811363-2-9.html30
51 files changed, 2022 insertions, 0 deletions
diff --git a/extensions/universalchardet/tests/CharsetDetectionTests.js b/extensions/universalchardet/tests/CharsetDetectionTests.js
new file mode 100644
index 000000000..6ccc9c3f1
--- /dev/null
+++ b/extensions/universalchardet/tests/CharsetDetectionTests.js
@@ -0,0 +1,94 @@
+/* -*- indent-tabs-mode: nil; js-indent-level: 4 -*- */
+/* vim: set ts=8 et sw=4 tw=80: */
+var gExpectedCharset;
+var gOldPref;
+var gDetectorList;
+var gTestIndex;
+var gLocalDir;
+var Cc = Components.classes;
+var Ci = Components.interfaces;
+
+function CharsetDetectionTests(aTestFile, aExpectedCharset, aDetectorList)
+{
+ gExpectedCharset = aExpectedCharset;
+ gDetectorList = aDetectorList;
+
+ InitDetectorTests();
+
+ var fileURI = gLocalDir + aTestFile;
+ $("testframe").src = fileURI;
+
+ SimpleTest.waitForExplicitFinish();
+}
+
+function InitDetectorTests()
+{
+ var prefService = Cc["@mozilla.org/preferences-service;1"]
+ .getService(Ci.nsIPrefBranch);
+ var str = Cc["@mozilla.org/supports-string;1"]
+ .createInstance(Ci.nsISupportsString);
+ var loader = Cc["@mozilla.org/moz/jssubscript-loader;1"]
+ .getService(Ci.mozIJSSubScriptLoader);
+ var ioService = Cc['@mozilla.org/network/io-service;1']
+ .getService(Ci.nsIIOService);
+ loader.loadSubScript("chrome://mochikit/content/chrome-harness.js");
+
+ try {
+ gOldPref = prefService
+ .getComplexValue("intl.charset.detector",
+ Ci.nsIPrefLocalizedString).data;
+ } catch (e) {
+ gOldPref = "";
+ }
+ SetDetectorPref(gDetectorList[0]);
+ gTestIndex = 0;
+ $("testframe").onload = DoDetectionTest;
+
+ if (gExpectedCharset == "default") {
+ // No point trying to be generic here, because we have plenty of other
+ // unit tests that fail if run using a non-windows-1252 locale.
+ gExpectedCharset = "windows-1252";
+ }
+
+ // Get the local directory. This needs to be a file: URI because chrome:
+ // URIs are always UTF-8 (bug 617339) and we are testing decoding from other
+ // charsets.
+ var jar = getJar(getRootDirectory(window.location.href));
+ var dir = jar ?
+ extractJarToTmp(jar) :
+ getChromeDir(getResolvedURI(window.location.href));
+ gLocalDir = ioService.newFileURI(dir).spec;
+}
+
+function SetDetectorPref(aPrefValue)
+{
+ var prefService = Cc["@mozilla.org/preferences-service;1"]
+ .getService(Ci.nsIPrefBranch);
+ var str = Cc["@mozilla.org/supports-string;1"]
+ .createInstance(Ci.nsISupportsString);
+ str.data = aPrefValue;
+ prefService.setComplexValue("intl.charset.detector",
+ Ci.nsISupportsString, str);
+ gCurrentDetector = aPrefValue;
+}
+
+function DoDetectionTest() {
+ var iframeDoc = $("testframe").contentDocument;
+ var charset = iframeDoc.characterSet;
+
+ is(charset, gExpectedCharset,
+ "decoded as " + gExpectedCharset + " by " + gDetectorList[gTestIndex]);
+
+ if (++gTestIndex < gDetectorList.length) {
+ SetDetectorPref(gDetectorList[gTestIndex]);
+ iframeDoc.location.reload();
+ } else {
+ CleanUpDetectionTests();
+ }
+}
+
+function CleanUpDetectionTests() {
+ SetDetectorPref(gOldPref);
+ SimpleTest.finish();
+}
+
diff --git a/extensions/universalchardet/tests/bug306272_text.html b/extensions/universalchardet/tests/bug306272_text.html
new file mode 100644
index 000000000..4a0c61283
--- /dev/null
+++ b/extensions/universalchardet/tests/bug306272_text.html
@@ -0,0 +1,9 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html><head>
+
+ <title>306272</title>
+
+
+</head><body>
+<a href="mailto:Antti.Nayha@somewhere.fi">Antti Näyhä &lt;Antti.Nayha@somewhere.fi&gt;</a>
+</body></html> \ No newline at end of file
diff --git a/extensions/universalchardet/tests/bug421271_text.html b/extensions/universalchardet/tests/bug421271_text.html
new file mode 100644
index 000000000..dfffc3363
--- /dev/null
+++ b/extensions/universalchardet/tests/bug421271_text.html
@@ -0,0 +1,5 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html><head>
+<meta http-equiv="Content-Type" content="text/html"><title>BBC - 606 - A Forum Conversation</title>
+</head>
+<body topmargin="0" leftmargin="0" marginheight="0" marginwidth="0"><p class="posted">posted 5 Weeks Ago</p><p>if rangers draw and marseille and benfica win i stand to lift 825. not bad for a 2 bet.<br>50p on 3 homes<br>Man Utd/Marseille/Benfica<br>50p on 3 Draws<br>Rangers/Halifax/Bristol City<br>50p on 3 Aways<br>Doncaster/Stranraer/Rushden &amp; Diamonds<br>and 50p on all nine results.<br>GET IN THERE.</p></body></html> \ No newline at end of file
diff --git a/extensions/universalchardet/tests/bug426271_text-euc-jp.html b/extensions/universalchardet/tests/bug426271_text-euc-jp.html
new file mode 100644
index 000000000..467d69c73
--- /dev/null
+++ b/extensions/universalchardet/tests/bug426271_text-euc-jp.html
@@ -0,0 +1,11 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html lang="ja">
+<head>
+<title>ܸ쥨󥳡ɥƥ</title>
+</head>
+<body>
+EUC-JPǤΡ˻ҶΤʤϷؤǤ̤򤷤Ƥȡ礭ή褿Τǡ줵ȿ٤褦Ȼäͤ椫ˤλҤޤ줿ΤǡϺפ̾դ˰Ƥ
+
+ĹϺϡε͡줷Ƥ뤳ȤΤꡢ༣դ롣ξƤĻҤ̤㤤ƻˤʬͿƥ̡롢˽롣ǵ襤˾ᡢåäƤäꡢ줵󡦤̤θ֤ꡢ餷Ȥŵ: ե꡼ɴʻŵإڥǥWikipediaˡ
+</body>
+</html>
diff --git a/extensions/universalchardet/tests/bug426271_text-utf-8.html b/extensions/universalchardet/tests/bug426271_text-utf-8.html
new file mode 100644
index 000000000..7e38c27c3
--- /dev/null
+++ b/extensions/universalchardet/tests/bug426271_text-utf-8.html
@@ -0,0 +1,11 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html lang="ja">
+<head>
+<title>日本語エンコードテスト</title>
+</head>
+<body>
+これはUTF-8です昔々、ある所に子供のいない老夫婦が住んでいた。ある日、お婆さんが川で洗濯をしていると、大きな桃が流れて来たので、お爺さんと食べようと持ち帰った。二人で桃を割ると中から男の子が生まれたので、「桃太郎」と名付けて大事に育てた。
+
+成長した桃太郎は、鬼ヶ島の鬼が人々を苦しめていることを知り、鬼退治を決意する。両親から黍団子を餞別に貰い、道中にそれを分け与えてイヌ、サル、キジを家来に従える。鬼ヶ島で鬼と戦い、見事に勝利を収め、鬼が方々から奪っていった財宝を持ち帰り、お爺さん・お婆さんの元に返り、幸せに暮らしたという。出典: フリー百科事典『ウィキペディア(Wikipedia)』
+</body>
+</html>
diff --git a/extensions/universalchardet/tests/bug431054_text.html b/extensions/universalchardet/tests/bug431054_text.html
new file mode 100644
index 000000000..aa88a4e1d
--- /dev/null
+++ b/extensions/universalchardet/tests/bug431054_text.html
@@ -0,0 +1,5 @@
+<html>
+<body>
+
+</body>
+</html>
diff --git a/extensions/universalchardet/tests/bug547487_text.html b/extensions/universalchardet/tests/bug547487_text.html
new file mode 100644
index 000000000..2fe6575e7
--- /dev/null
+++ b/extensions/universalchardet/tests/bug547487_text.html
@@ -0,0 +1 @@
+The quick brown fox jumps over the lazy dog.
diff --git a/extensions/universalchardet/tests/bug620106_text.html b/extensions/universalchardet/tests/bug620106_text.html
new file mode 100644
index 000000000..b7ca0aca3
--- /dev/null
+++ b/extensions/universalchardet/tests/bug620106_text.html
@@ -0,0 +1,1045 @@
+<!DOCTYPE html>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ƥȤΥ󥳡ǥ󥰤򸡽С⤦٥ƥȡޤ󥳡ɤθФƥȤޤ줬ФƤޤ
+
diff --git a/extensions/universalchardet/tests/bug631751be_text.html b/extensions/universalchardet/tests/bug631751be_text.html
new file mode 100644
index 000000000..104d50399
--- /dev/null
+++ b/extensions/universalchardet/tests/bug631751be_text.html
Binary files differ
diff --git a/extensions/universalchardet/tests/bug631751le_text.html b/extensions/universalchardet/tests/bug631751le_text.html
new file mode 100644
index 000000000..a1e5f6bfb
--- /dev/null
+++ b/extensions/universalchardet/tests/bug631751le_text.html
Binary files differ
diff --git a/extensions/universalchardet/tests/bug638318_text.html b/extensions/universalchardet/tests/bug638318_text.html
new file mode 100644
index 000000000..3f2ff4421
--- /dev/null
+++ b/extensions/universalchardet/tests/bug638318_text.html
Binary files differ
diff --git a/extensions/universalchardet/tests/bug811363-1.text b/extensions/universalchardet/tests/bug811363-1.text
new file mode 100644
index 000000000..a2952d62f
--- /dev/null
+++ b/extensions/universalchardet/tests/bug811363-1.text
@@ -0,0 +1 @@
+Two-byte UTF-8 including the first and last characters in the range: €Шерлок߿
diff --git a/extensions/universalchardet/tests/bug811363-2.text b/extensions/universalchardet/tests/bug811363-2.text
new file mode 100644
index 000000000..b3b672635
--- /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: ࠀशर्लक࿿
+
diff --git a/extensions/universalchardet/tests/bug811363-3.text b/extensions/universalchardet/tests/bug811363-3.text
new file mode 100644
index 000000000..29b6d4c58
--- /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: ကシャーロック쿿
+
diff --git a/extensions/universalchardet/tests/bug811363-4.text b/extensions/universalchardet/tests/bug811363-4.text
new file mode 100644
index 000000000..f337d2e43
--- /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: 퀀홈하홈탐퟿
+
diff --git a/extensions/universalchardet/tests/bug811363-5.text b/extensions/universalchardet/tests/bug811363-5.text
new file mode 100644
index 000000000..2827c8030
--- /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: ﴍﻟﻮﻙ￿
+
diff --git a/extensions/universalchardet/tests/bug811363-6.text b/extensions/universalchardet/tests/bug811363-6.text
new file mode 100644
index 000000000..c23e0077c
--- /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: 𐀀𐌲𐌿𐍄𐌹𐍃𐌺 𿿿
+
diff --git a/extensions/universalchardet/tests/bug811363-7.text b/extensions/universalchardet/tests/bug811363-7.text
new file mode 100644
index 000000000..8a2c209f1
--- /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: 񀀀񠀀 񠀁 񠀂󿿿
+
diff --git a/extensions/universalchardet/tests/bug811363-8.text b/extensions/universalchardet/tests/bug811363-8.text
new file mode 100644
index 000000000..b82f3da40
--- /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:􀀀􈀀 􈀁 􈀂􏿿
+
diff --git a/extensions/universalchardet/tests/bug811363-9.text b/extensions/universalchardet/tests/bug811363-9.text
new file mode 100644
index 000000000..50b232eaf
--- /dev/null
+++ b/extensions/universalchardet/tests/bug811363-9.text
@@ -0,0 +1,2 @@
+Four byte UTF-8, first byte 0xF0, including BMP only:𐤔𐤓𐤋𐤅𐤒
+
diff --git a/extensions/universalchardet/tests/bug811363-invalid-1.text b/extensions/universalchardet/tests/bug811363-invalid-1.text
new file mode 100644
index 000000000..8718c36d7
--- /dev/null
+++ b/extensions/universalchardet/tests/bug811363-invalid-1.text
@@ -0,0 +1,4 @@
+Orphaned continuation bytes:
+
+
+
diff --git a/extensions/universalchardet/tests/bug811363-invalid-2.text b/extensions/universalchardet/tests/bug811363-invalid-2.text
new file mode 100644
index 000000000..d38980fad
--- /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:
diff --git a/extensions/universalchardet/tests/bug811363-invalid-3.text b/extensions/universalchardet/tests/bug811363-invalid-3.text
new file mode 100644
index 000000000..1c438d70a
--- /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):
diff --git a/extensions/universalchardet/tests/bug811363-invalid-4.text b/extensions/universalchardet/tests/bug811363-invalid-4.text
new file mode 100644
index 000000000..8a943dca3
--- /dev/null
+++ b/extensions/universalchardet/tests/bug811363-invalid-4.text
@@ -0,0 +1 @@
+Overlong encodings:
diff --git a/extensions/universalchardet/tests/bug811363-invalid-5.text b/extensions/universalchardet/tests/bug811363-invalid-5.text
new file mode 100644
index 000000000..fa76449c2
--- /dev/null
+++ b/extensions/universalchardet/tests/bug811363-invalid-5.text
@@ -0,0 +1,3 @@
+Isolated surrogates:
+Surrogate pairs:
+
diff --git a/extensions/universalchardet/tests/chrome.ini b/extensions/universalchardet/tests/chrome.ini
new file mode 100644
index 000000000..995ff043f
--- /dev/null
+++ b/extensions/universalchardet/tests/chrome.ini
@@ -0,0 +1,52 @@
+[DEFAULT]
+support-files =
+ CharsetDetectionTests.js
+ bug306272_text.html
+ bug421271_text.html
+ bug426271_text-euc-jp.html
+ bug426271_text-utf-8.html
+ bug431054_text.html
+ bug547487_text.html
+ bug631751be_text.html
+ bug631751le_text.html
+ bug638318_text.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_bug306272.html]
+[test_bug421271.html]
+[test_bug426271-euc-jp.html]
+[test_bug426271-utf-8.html]
+[test_bug431054-japanese.html]
+[test_bug431054.html]
+[test_bug547487.html]
+[test_bug631751be.html]
+[test_bug631751le.html]
+[test_bug638318.html]
+[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]
+
diff --git a/extensions/universalchardet/tests/moz.build b/extensions/universalchardet/tests/moz.build
new file mode 100644
index 000000000..47f2ae432
--- /dev/null
+++ b/extensions/universalchardet/tests/moz.build
@@ -0,0 +1,8 @@
+# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
+# vim: set filetype=python:
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+MOCHITEST_CHROME_MANIFESTS += ['chrome.ini']
+
diff --git a/extensions/universalchardet/tests/test_bug306272.html b/extensions/universalchardet/tests/test_bug306272.html
new file mode 100644
index 000000000..d797b45af
--- /dev/null
+++ b/extensions/universalchardet/tests/test_bug306272.html
@@ -0,0 +1,31 @@
+<!DOCTYPE HTML>
+<html>
+<!--
+https://bugzilla.mozilla.org/show_bug.cgi?id=306272
+-->
+<head>
+ <title>Test for Bug 306272</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=306272">Mozilla Bug 306272</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 306272 **/
+CharsetDetectionTests("bug306272_text.html",
+ "UTF-8",
+ new Array("ja_parallel_state_machine"));
+</script>
+</pre>
+</body>
+</html>
+
diff --git a/extensions/universalchardet/tests/test_bug421271.html b/extensions/universalchardet/tests/test_bug421271.html
new file mode 100644
index 000000000..2e6cd29e7
--- /dev/null
+++ b/extensions/universalchardet/tests/test_bug421271.html
@@ -0,0 +1,37 @@
+<!DOCTYPE HTML>
+<html>
+<!--
+https://bugzilla.mozilla.org/show_bug.cgi?id=421271
+-->
+<head>
+ <title>Test for Bug 421271</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=421271">Mozilla Bug 421271</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 421271 **/
+CharsetDetectionTests("bug421271_text.html",
+ "windows-1252",
+ new Array("ja_parallel_state_machine",
+ "ko_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>
+
diff --git a/extensions/universalchardet/tests/test_bug426271-euc-jp.html b/extensions/universalchardet/tests/test_bug426271-euc-jp.html
new file mode 100644
index 000000000..4eeca8282
--- /dev/null
+++ b/extensions/universalchardet/tests/test_bug426271-euc-jp.html
@@ -0,0 +1,31 @@
+<!DOCTYPE HTML>
+<html>
+<!--
+https://bugzilla.mozilla.org/show_bug.cgi?id=426271
+-->
+<head>
+ <title>Test for Bug 426271</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=426271">Mozilla Bug 426271</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 426271 **/
+CharsetDetectionTests("bug426271_text-euc-jp.html",
+ "EUC-JP",
+ new Array("ja_parallel_state_machine"));
+</script>
+</pre>
+</body>
+</html>
+
diff --git a/extensions/universalchardet/tests/test_bug426271-utf-8.html b/extensions/universalchardet/tests/test_bug426271-utf-8.html
new file mode 100644
index 000000000..a393e624e
--- /dev/null
+++ b/extensions/universalchardet/tests/test_bug426271-utf-8.html
@@ -0,0 +1,32 @@
+<!DOCTYPE HTML>
+<html>
+<!--
+https://bugzilla.mozilla.org/show_bug.cgi?id=426271
+-->
+<head>
+ <title>Test for Bug 426271</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=426271">Mozilla Bug 426271</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">
+SimpleTest.expectAssertions(1);
+/** Test for Bug 426271 **/
+CharsetDetectionTests("bug426271_text-utf-8.html",
+ "UTF-8",
+ new Array("ja_parallel_state_machine"));
+</script>
+</pre>
+</body>
+</html>
+
diff --git a/extensions/universalchardet/tests/test_bug431054-japanese.html b/extensions/universalchardet/tests/test_bug431054-japanese.html
new file mode 100644
index 000000000..64b806663
--- /dev/null
+++ b/extensions/universalchardet/tests/test_bug431054-japanese.html
@@ -0,0 +1,30 @@
+<!DOCTYPE HTML>
+<html>
+<!--
+https://bugzilla.mozilla.org/show_bug.cgi?id=431054
+-->
+<head>
+ <title>Test for Bug 431054</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=426271">Mozilla Bug 431054</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 431054 **/
+CharsetDetectionTests("bug431054_text.html",
+ "EUC-JP",
+ new Array("ja_parallel_state_machine"));
+</script>
+</pre>
+</body>
+</html>
diff --git a/extensions/universalchardet/tests/test_bug431054.html b/extensions/universalchardet/tests/test_bug431054.html
new file mode 100644
index 000000000..a33fa2569
--- /dev/null
+++ b/extensions/universalchardet/tests/test_bug431054.html
@@ -0,0 +1,34 @@
+<!DOCTYPE HTML>
+<html>
+<!--
+https://bugzilla.mozilla.org/show_bug.cgi?id=431054
+-->
+<head>
+ <title>Test for Bug 431054</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=426271">Mozilla Bug 431054</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 431054 **/
+CharsetDetectionTests("bug431054_text.html",
+ "windows-1252",
+ new Array("zhtw_parallel_state_machine",
+ "zhcn_parallel_state_machine",
+ "zh_parallel_state_machine",
+ "cjk_parallel_state_machine",
+ "universal_charset_detector"));
+</script>
+</pre>
+</body>
+</html>
diff --git a/extensions/universalchardet/tests/test_bug547487.html b/extensions/universalchardet/tests/test_bug547487.html
new file mode 100644
index 000000000..37c4708d9
--- /dev/null
+++ b/extensions/universalchardet/tests/test_bug547487.html
@@ -0,0 +1,36 @@
+<!DOCTYPE HTML>
+<html>
+<!--
+https://bugzilla.mozilla.org/show_bug.cgi?id=547487
+-->
+<head>
+ <title>Test for Bug 547487</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=547487">Mozilla Bug 547487</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 547487 **/
+CharsetDetectionTests("bug547487_text.html",
+ "default",
+ new Array("zhtw_parallel_state_machine",
+ "zhcn_parallel_state_machine",
+ "ja_parallel_state_machine",
+ "ko_parallel_state_machine",
+ "zh_parallel_state_machine",
+ "cjk_parallel_state_machine",
+ "universal_charset_detector"));
+</script>
+</pre>
+</body>
+</html>
diff --git a/extensions/universalchardet/tests/test_bug631751be.html b/extensions/universalchardet/tests/test_bug631751be.html
new file mode 100644
index 000000000..de965cbf2
--- /dev/null
+++ b/extensions/universalchardet/tests/test_bug631751be.html
@@ -0,0 +1,31 @@
+<!DOCTYPE HTML>
+<html>
+<!--
+https://bugzilla.mozilla.org/show_bug.cgi?id=631751
+-->
+<head>
+ <title>Test for Bug 631751</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=631751">Mozilla Bug 631751</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 631751 **/
+/* Note! This test uses the chardet test harness but doesn't test chardet! */
+CharsetDetectionTests("bug631751be_text.html",
+ "UTF-16BE",
+ new Array(""));
+</script>
+</pre>
+</body>
+</html>
diff --git a/extensions/universalchardet/tests/test_bug631751le.html b/extensions/universalchardet/tests/test_bug631751le.html
new file mode 100644
index 000000000..ef19537b8
--- /dev/null
+++ b/extensions/universalchardet/tests/test_bug631751le.html
@@ -0,0 +1,31 @@
+<!DOCTYPE HTML>
+<html>
+<!--
+https://bugzilla.mozilla.org/show_bug.cgi?id=631751
+-->
+<head>
+ <title>Test for Bug 631751</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=631751">Mozilla Bug 631751</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 631751 **/
+/* Note! This test uses the chardet test harness but doesn't test chardet! */
+CharsetDetectionTests("bug631751le_text.html",
+ "UTF-16LE",
+ new Array(""));
+</script>
+</pre>
+</body>
+</html>
diff --git a/extensions/universalchardet/tests/test_bug638318.html b/extensions/universalchardet/tests/test_bug638318.html
new file mode 100644
index 000000000..62e78052b
--- /dev/null
+++ b/extensions/universalchardet/tests/test_bug638318.html
@@ -0,0 +1,31 @@
+<!DOCTYPE HTML>
+<html>
+<!--
+https://bugzilla.mozilla.org/show_bug.cgi?id=638318
+-->
+<head>
+ <title>Test for Bug 638318</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=638318">Mozilla Bug 638318</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 638318 **/
+/* Note! This test uses the chardet test harness but doesn't test chardet! */
+CharsetDetectionTests("bug638318_text.html",
+ "windows-1252",
+ new Array(""));
+</script>
+</pre>
+</body>
+</html>
diff --git a/extensions/universalchardet/tests/test_bug811363-1-1.html b/extensions/universalchardet/tests/test_bug811363-1-1.html
new file mode 100644
index 000000000..6583d39b4
--- /dev/null
+++ b/extensions/universalchardet/tests/test_bug811363-1-1.html
@@ -0,0 +1,30 @@
+<!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",
+ "windows-1252",
+ new Array("ja_parallel_state_machine"));
+</script>
+</pre>
+</body>
+</html>
diff --git a/extensions/universalchardet/tests/test_bug811363-1-2.html b/extensions/universalchardet/tests/test_bug811363-1-2.html
new file mode 100644
index 000000000..86d00828d
--- /dev/null
+++ b/extensions/universalchardet/tests/test_bug811363-1-2.html
@@ -0,0 +1,30 @@
+<!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"));
+</script>
+</pre>
+</body>
+</html>
diff --git a/extensions/universalchardet/tests/test_bug811363-1-3.html b/extensions/universalchardet/tests/test_bug811363-1-3.html
new file mode 100644
index 000000000..782fba274
--- /dev/null
+++ b/extensions/universalchardet/tests/test_bug811363-1-3.html
@@ -0,0 +1,30 @@
+<!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"));
+</script>
+</pre>
+</body>
+</html>
diff --git a/extensions/universalchardet/tests/test_bug811363-1-4.html b/extensions/universalchardet/tests/test_bug811363-1-4.html
new file mode 100644
index 000000000..590f221b1
--- /dev/null
+++ b/extensions/universalchardet/tests/test_bug811363-1-4.html
@@ -0,0 +1,30 @@
+<!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"));
+</script>
+</pre>
+</body>
+</html>
diff --git a/extensions/universalchardet/tests/test_bug811363-1-5.html b/extensions/universalchardet/tests/test_bug811363-1-5.html
new file mode 100644
index 000000000..11233dc24
--- /dev/null
+++ b/extensions/universalchardet/tests/test_bug811363-1-5.html
@@ -0,0 +1,30 @@
+<!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",
+ "windows-1252",
+ new Array("ja_parallel_state_machine"));
+</script>
+</pre>
+</body>
+</html>
diff --git a/extensions/universalchardet/tests/test_bug811363-2-1.html b/extensions/universalchardet/tests/test_bug811363-2-1.html
new file mode 100644
index 000000000..e380f7269
--- /dev/null
+++ b/extensions/universalchardet/tests/test_bug811363-2-1.html
@@ -0,0 +1,30 @@
+<!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"));
+</script>
+</pre>
+</body>
+</html>
diff --git a/extensions/universalchardet/tests/test_bug811363-2-2.html b/extensions/universalchardet/tests/test_bug811363-2-2.html
new file mode 100644
index 000000000..0a4e41f3c
--- /dev/null
+++ b/extensions/universalchardet/tests/test_bug811363-2-2.html
@@ -0,0 +1,30 @@
+<!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"));
+</script>
+</pre>
+</body>
+</html>
diff --git a/extensions/universalchardet/tests/test_bug811363-2-3.html b/extensions/universalchardet/tests/test_bug811363-2-3.html
new file mode 100644
index 000000000..713a191f1
--- /dev/null
+++ b/extensions/universalchardet/tests/test_bug811363-2-3.html
@@ -0,0 +1,30 @@
+<!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"));
+</script>
+</pre>
+</body>
+</html>
diff --git a/extensions/universalchardet/tests/test_bug811363-2-4.html b/extensions/universalchardet/tests/test_bug811363-2-4.html
new file mode 100644
index 000000000..725e1b7f4
--- /dev/null
+++ b/extensions/universalchardet/tests/test_bug811363-2-4.html
@@ -0,0 +1,30 @@
+<!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"));
+</script>
+</pre>
+</body>
+</html>
diff --git a/extensions/universalchardet/tests/test_bug811363-2-5.html b/extensions/universalchardet/tests/test_bug811363-2-5.html
new file mode 100644
index 000000000..8bdd8b8ce
--- /dev/null
+++ b/extensions/universalchardet/tests/test_bug811363-2-5.html
@@ -0,0 +1,30 @@
+<!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"));
+</script>
+</pre>
+</body>
+</html>
diff --git a/extensions/universalchardet/tests/test_bug811363-2-6.html b/extensions/universalchardet/tests/test_bug811363-2-6.html
new file mode 100644
index 000000000..6208f7389
--- /dev/null
+++ b/extensions/universalchardet/tests/test_bug811363-2-6.html
@@ -0,0 +1,30 @@
+<!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"));
+</script>
+</pre>
+</body>
+</html>
diff --git a/extensions/universalchardet/tests/test_bug811363-2-7.html b/extensions/universalchardet/tests/test_bug811363-2-7.html
new file mode 100644
index 000000000..694ff73b3
--- /dev/null
+++ b/extensions/universalchardet/tests/test_bug811363-2-7.html
@@ -0,0 +1,30 @@
+<!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"));
+</script>
+</pre>
+</body>
+</html>
diff --git a/extensions/universalchardet/tests/test_bug811363-2-8.html b/extensions/universalchardet/tests/test_bug811363-2-8.html
new file mode 100644
index 000000000..49d094d7b
--- /dev/null
+++ b/extensions/universalchardet/tests/test_bug811363-2-8.html
@@ -0,0 +1,30 @@
+<!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"));
+</script>
+</pre>
+</body>
+</html>
diff --git a/extensions/universalchardet/tests/test_bug811363-2-9.html b/extensions/universalchardet/tests/test_bug811363-2-9.html
new file mode 100644
index 000000000..5f2312cdf
--- /dev/null
+++ b/extensions/universalchardet/tests/test_bug811363-2-9.html
@@ -0,0 +1,30 @@
+<!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"));
+</script>
+</pre>
+</body>
+</html>