1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/layout/style/test/test_bug829816.html Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,56 @@ 1.4 +<!DOCTYPE HTML> 1.5 +<html> 1.6 +<!-- 1.7 +https://bugzilla.mozilla.org/show_bug.cgi?id=829816 1.8 +--> 1.9 +<head> 1.10 + <meta charset="utf-8"> 1.11 + <title>Test for Bug 829816</title> 1.12 + <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script> 1.13 + <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/> 1.14 + 1.15 + <style type="text/css"> 1.16 + b { content: "\0"; counter-reset: \0 } 1.17 + b { content: "\00"; counter-reset: \00 } 1.18 + b { content: "\000"; counter-reset: \000 } 1.19 + b { content: "\0000"; counter-reset: \0000 } 1.20 + b { content: "\00000"; counter-reset: \00000 } 1.21 + b { content: "\000000"; counter-reset: \000000 } 1.22 + </style> 1.23 + 1.24 + <!-- U+0000 characters in <style> would be replaced by the HTML parser --> 1.25 + <link rel="stylesheet" type="text/css" href="file_bug829816.css"/> 1.26 + 1.27 + <script type="application/javascript"> 1.28 + 1.29 + /** Test for Bug 829816 **/ 1.30 + var ss = document.styleSheets[1]; 1.31 + 1.32 + for (var i = 0; i < 6; i++) { 1.33 + is(ss.cssRules[i].style.content, "\"\uFFFD\"", 1.34 + "\\0 in strings should be converted to U+FFFD"); 1.35 + is(ss.cssRules[i].style.counterReset, "\uFFFD", 1.36 + "\\0 in identifiers should be converted to U+FFFD"); 1.37 + } 1.38 + 1.39 + is(document.styleSheets[2].cssRules[0].style.content, "\"\uFFFD\"", 1.40 + "U+0000 in strings should be converted to U+FFFD"); 1.41 + is(document.styleSheets[2].cssRules[0].style.counterReset, "\uFFFD", 1.42 + "U+0000 in identifiers should be converted to U+FFFD"); 1.43 + is(document.styleSheets[2].cssRules[1].style.content, "\"\uFFFD\"", 1.44 + "U+0000 in strings should be converted to U+FFFD"); 1.45 + is(document.styleSheets[2].cssRules[1].style.counterReset, "\uFFFD", 1.46 + "U+0000 in identifiers should be converted to U+FFFD"); 1.47 + 1.48 + 1.49 + </script> 1.50 +</head> 1.51 +<body> 1.52 +<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=829816">Mozilla Bug 829816</a> 1.53 +<p id="display"></p> 1.54 +<div id="content" style="display: none"> 1.55 +</div> 1.56 +<pre id="test"> 1.57 +</pre> 1.58 +</body> 1.59 +</html>