blob: 2651b0701d438f6533df8a28f72c09f74a0da736 [file] [log] [blame]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/Strict.dtd">
<html xml:lang="en" lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>XHTML innerHTML null byte test</title>
<script><![CDATA[
if (window.testRunner)
testRunner.dumpAsText();
]]></script>
</head>
<body>
<p id="p0">FAIL: No exception raised.</p>
<script><![CDATA[
try {
document.getElementById("p0").innerHTML = "FAIL: Nulls mishandled.\x00";
} catch(e) {
document.getElementById("p0").innerHTML = "PASS: An exception was raised, no crashing.";
if (e.code != DOMException.SYNTAX_ERR)
console.log("Unexpected error thrown: " + e.name + ": " + e.message);
}
]]></script>
</body>
</html>