blob: 92cccaea8d557b96723c3c41319c2e35ae727b90 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
<body>
<p>Should say PASS:</p>
<div id="test"></div>
<script>
if (window.testRunner)
testRunner.dumpAsText();
var e= document.createElement('style');
e.innerHTML= "<p>foobar</p>"; // yes, that's invalid CSS
document.body.appendChild(e);
// If it were parsed, it would have been just "foobar".
document.getElementById("test").innerHTML = (e.textContent == "<p>foobar</p>") ? "PASS" : "FAIL";
</script>
|