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