<head>
<script>
if (window.testRunner)
    testRunner.dumpAsText();
</script>
</head>
<body>
<p>This text should NOT be visible. It should be overwritten by the result of the test.</p> 
<p>There should be no text below this, because the text is inside a canvas element and JavaScript is enabled.</p> 
<canvas>This text should NOT be visible if JavaScript is enabled.</canvas>
<script>
var result = "The DOM part of this test FAILED. The canvas element did not have a child.";
if (document.getElementsByTagName("canvas")[0].firstChild)
    result = "The DOM part of this test succeeded. The canvas element had at least one child, "
        + "indicating that we are hiding text by not rendering it, but we are creating DOM elements as expected."
document.getElementsByTagName("p")[0].innerText = result;
</script>
</body>
