Permalink
Browse files

Test for bug 638318 - Test that a byte run that has more than 1024 ze…

…ros but one non-zero byte among them before the 1024 byte limit does not sniff as UTF-16LE/BE. r=bzbarsky, a=test-only.
  • Loading branch information...
1 parent 4adfdb8 commit cc99f71e414b2b34b6d8635713d9e6d29b3cfed8 @hsivonen hsivonen committed Mar 3, 2011
@@ -74,6 +74,8 @@ _TEST_FILES = \
test_bug631751le.html \
bug631751be_text.html \
test_bug631751be.html \
+ bug638318_text.html \
+ test_bug638318.html \
$(NULL)
libs:: $(_TEST_FILES)
Binary file not shown.
@@ -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>

0 comments on commit cc99f71

Please sign in to comment.