Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(805)

Side by Side Diff: third_party/WebKit/LayoutTests/html/document-metadata/resources/head-check.js

Issue 2780363002: Rename subdirectory names in LayoutTests/html/. (Closed)
Patch Set: Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 var maxTests = 4;
2 var currentTest = 1;
3 var iframe;
4
5 if (window.testRunner) {
6 window.testRunner.waitUntilDone();
7 }
8
9 function testAndLoadNext() {
10 iframe = document.getElementById("iframe");
11 if (iframe.src.substring(0, 5) == "data:") {
12 iframe.src = "resources/head-check-" + currentTest + ".html";
13 return;
14 }
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.toLow erCase()", "'head'");
18 debug("");
19 if (currentTest < maxTests) {
20 currentTest++;
21 iframe.src = "data:text/html,";
22 }
23 else {
24 iframe.style.display = "none";
25 debug('<span class="pass">TEST COMPLETE</span>');
26 if (window.testRunner) {
27 window.testRunner.notifyDone();
28 }
29 }
30 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698