Test for bug 638318 - Test that a byte run that has more than 1024 zeros but one non-zero byte among them before the 1024 byte limit does not sniff as UTF-16LE/BE. r=bzbarsky, a=test-only.
authorHenri Sivonen <hsivonen@iki.fi>
Thu, 03 Mar 2011 19:20:00 +0200
changeset 63322 770e2709cff513f8690c27cd0c78d7a62849847c
parent 63321 ed9c526f93b5373ff45415ccba4232369c82f645
child 63323 290712e55ade900bdaf71c6701aa9f25220c983b
push id19145
push userhsivonen@iki.fi
push dateThu, 03 Mar 2011 17:29:06 +0000
treeherdermozilla-central@770e2709cff5 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbzbarsky, test-only
bugs638318
milestone2.0b13pre
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
Test for bug 638318 - Test that a byte run that has more than 1024 zeros but one non-zero byte among them before the 1024 byte limit does not sniff as UTF-16LE/BE. r=bzbarsky, a=test-only.
extensions/universalchardet/tests/Makefile.in
extensions/universalchardet/tests/bug638318_text.html
extensions/universalchardet/tests/test_bug638318.html
--- a/extensions/universalchardet/tests/Makefile.in
+++ b/extensions/universalchardet/tests/Makefile.in
@@ -69,12 +69,14 @@ relativesrcdir = extensions/universalcha
 		bug547487_text.html \
 		test_bug547487.html \
 		bug620106_text.html \
 		test_bug620106.html \
 		bug631751le_text.html \
 		test_bug631751le.html \
 		bug631751be_text.html \
 		test_bug631751be.html \
+		bug638318_text.html \
+		test_bug638318.html \
 		$(NULL)
 
 libs:: $(_TEST_FILES)
 	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/chrome/$(relativesrcdir)
new file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..3f2ff44212a0e76e960de0d5971ddd9a71516221
GIT binary patch
literal 1108
rc${Nk7zLwXfI#9vJ75%$2y99+OL9`}{QN@{LPOki4b2p7^f810k(&!M
new file mode 100644
--- /dev/null
+++ b/extensions/universalchardet/tests/test_bug638318.html
@@ -0,0 +1,33 @@
+<!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/MochiKit/packed.js"></script>
+  <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",
+		      "ISO-8859-1",
+		      new Array(""));
+</script>
+</pre>
+</body>
+</html>