Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / parser / xhtml-innerhtml-null-byte.xhtml
blobf15e8e98cbeffa2742e9f5df9b496a8c906689a8
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/Strict.dtd">
2 <html xml:lang="en" lang="en" xmlns="http://www.w3.org/1999/xhtml">
3 <head>
4 <title>XHTML innerHTML null byte test</title>
5 <script><![CDATA[
6 if (window.testRunner)
7 testRunner.dumpAsText();
8 ]]></script>
9 </head>
10 <body>
11 <p id="p0">FAIL: No exception raised.</p>
12 <script><![CDATA[
13 try {
14 document.getElementById("p0").innerHTML = "FAIL: Nulls mishandled.\x00";
15 } catch(e) {
16 document.getElementById("p0").innerHTML = "PASS: An exception was raised, no crashing.";
17 if (e.code != DOMException.SYNTAX_ERR)
18 console.log("Unexpected error thrown: " + e.name + ": " + e.message);
20 ]]></script>
21 </body>
22 </html>