5 if (window
.testRunner
) {
6 window
.testRunner
.waitUntilDone();
9 function testAndLoadNext() {
10 iframe
= document
.getElementById("iframe");
11 if (iframe
.src
.substring(0, 5) == "data:") {
12 iframe
.src
= "resources/head-check-" + currentTest
+ ".html";
15 debug("Testing: " + iframe
.src
.substring(iframe
.src
.lastIndexOf("/") + 1));
16 shouldBe("iframe.contentWindow.document.getElementsByTagName('head').length", "1");
17 shouldBe("iframe.contentWindow.document.firstChild.firstChild.nodeName.toLowerCase()", "'head'");
19 if (currentTest
< maxTests
) {
21 iframe
.src
= "data:text/html,";
24 iframe
.style
.display
= "none";
25 debug('<span class="pass">TEST COMPLETE</span>');
26 if (window
.testRunner
) {
27 window
.testRunner
.notifyDone();