test_bug829816.html (1924B)
1 <!DOCTYPE HTML> 2 <html> 3 <!-- 4 https://bugzilla.mozilla.org/show_bug.cgi?id=829816 5 --> 6 <head> 7 <meta charset="utf-8"> 8 <title>Test for Bug 829816</title> 9 <script src="/tests/SimpleTest/SimpleTest.js"></script> 10 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/> 11 12 <style type="text/css"> 13 b { content: "\0"; counter-reset: \0 } 14 b { content: "\00"; counter-reset: \00 } 15 b { content: "\000"; counter-reset: \000 } 16 b { content: "\0000"; counter-reset: \0000 } 17 b { content: "\00000"; counter-reset: \00000 } 18 b { content: "\000000"; counter-reset: \000000 } 19 </style> 20 21 <!-- U+0000 characters in <style> would be replaced by the HTML parser --> 22 <link rel="stylesheet" type="text/css" href="file_bug829816.css"/> 23 24 <script type="application/javascript"> 25 26 /** Test for Bug 829816 */ 27 var ss = document.styleSheets[1]; 28 29 for (var i = 0; i < 6; i++) { 30 is(ss.cssRules[i].style.content, "\"\uFFFD\"", 31 "\\0 in strings should be converted to U+FFFD"); 32 is(ss.cssRules[i].style.counterReset, "\uFFFD 0", 33 "\\0 in identifiers should be converted to U+FFFD"); 34 } 35 36 is(document.styleSheets[2].cssRules[0].style.content, "\"\uFFFD\"", 37 "U+0000 in strings should be converted to U+FFFD"); 38 is(document.styleSheets[2].cssRules[0].style.counterReset, "\uFFFD 0", 39 "U+0000 in identifiers should be converted to U+FFFD"); 40 is(document.styleSheets[2].cssRules[1].style.content, "\"\uFFFD\"", 41 "U+0000 in strings should be converted to U+FFFD"); 42 is(document.styleSheets[2].cssRules[1].style.counterReset, "\uFFFD 0", 43 "U+0000 in identifiers should be converted to U+FFFD"); 44 45 46 </script> 47 </head> 48 <body> 49 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=829816">Mozilla Bug 829816</a> 50 <p id="display"></p> 51 <div id="content" style="display: none"> 52 </div> 53 <pre id="test"> 54 </pre> 55 </body> 56 </html>