Tests for bug 564679
authorSimon Montagu <smontagu@smontagu.org>
Tue, 11 May 2010 17:38:25 +0300
changeset 42127 15cec4043fba4c3706421945f439434acf7e522a
parent 42126 3c5d45390f00f9ea1b94d7a117e9aae352b708fb
child 42128 96edff6785272e6279a34136f382dbaf1b60990a
push idunknown
push userunknown
push dateunknown
bugs564679
milestone1.9.3a5pre
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
Tests for bug 564679
intl/uconv/tests/Makefile.in
intl/uconv/tests/test_singlebyte_overconsumption.html
--- a/intl/uconv/tests/Makefile.in
+++ b/intl/uconv/tests/Makefile.in
@@ -62,16 +62,17 @@ endif
 SIMPLE_PROGRAMS	= $(CPPSRCS:.cpp=$(BIN_SUFFIX))
 
 endif # MOZ_ENABLE_LIBXUL
 
 relativesrcdir	= intl/uconv/tests
 
 _TEST_FILES =	\
 		test_bug335816.html \
+		test_singlebyte_overconsumption.html \
 		test_unicode_noncharacterescapes.html \
 		test_unicode_noncharacters_gb18030.html \
 		test_unicode_noncharacters_utf8.html \
 		test_utf8_overconsumption.html \
 		$(NULL)
 libs:: $(_TEST_FILES)
 	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/tests/$(relativesrcdir)
 
new file mode 100644
--- /dev/null
+++ b/intl/uconv/tests/test_singlebyte_overconsumption.html
@@ -0,0 +1,34 @@
+<!DOCTYPE HTML>
+<html>
+<!--
+https://bugzilla.mozilla.org/show_bug.cgi?id=564679
+-->
+<head>
+  <meta http-equiv="Content-type" content="text/html; charset=windows-1253">
+  <title>Test for undefined codepoints</title>
+  <script type="text/javascript" src="/MochiKit/packed.js"></script>
+  <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
+  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
+</head>
+<body onload="test()">
+<pre id="test">
+<script class="testbody" type="text/javascript">
+
+/** test that single byte decoding resynchronizes after undefined codepoints */
+function test()
+{
+    is($("display").innerHTML, "All good.", "No overconsumption");
+    SimpleTest.finish();
+}
+
+  SimpleTest.waitForExplicitFinish();
+</script>
+</pre>
+<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=564679">Mozilla Bug 564679</a>
+<p id="display">Evil.</p>
+<div id="content" style="display: none"></div>
+ <script type="text/javascript">
+ $("display").innerHTML = "All good.";
+  </script> ->
+</body>
+</html>