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

Side by Side Diff: LayoutTests/http/tests/w3c/resources/testharnessreport.js

Issue 1165753005: testharnessreport: Remove div[id=log] from resultant HTML. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 6 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 | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * THIS FILE INTENTIONALLY LEFT BLANK 2 * THIS FILE INTENTIONALLY LEFT BLANK
3 * 3 *
4 * More specifically, this file is intended for vendors to implement 4 * More specifically, this file is intended for vendors to implement
5 * code needed to integrate testharness.js tests with their own test systems. 5 * code needed to integrate testharness.js tests with their own test systems.
6 * 6 *
7 * Typically such integration will attach callbacks when each test is 7 * Typically such integration will attach callbacks when each test is
8 * has run, using add_result_callback(callback(test)), or when the whole test fi le has 8 * has run, using add_result_callback(callback(test)), or when the whole test fi le has
9 * completed, using add_completion_callback(callback(tests, harness_status)). 9 * completed, using add_completion_callback(callback(tests, harness_status)).
10 * 10 *
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 // Set results element's textContent to the results string 95 // Set results element's textContent to the results string
96 results.textContent = resultStr; 96 results.textContent = resultStr;
97 97
98 function done() { 98 function done() {
99 if (self.testRunner) { 99 if (self.testRunner) {
100 var logDiv = document.getElementById('log'); 100 var logDiv = document.getElementById('log');
101 if ((isCSSWGTest() || isJSTest()) && logDiv) { 101 if ((isCSSWGTest() || isJSTest()) && logDiv) {
102 // Assume it's a CSSWG style test, and anything other than the l og div isn't 102 // Assume it's a CSSWG style test, and anything other than the l og div isn't
103 // material to the testrunner output, so should be hidden from t he text dump 103 // material to the testrunner output, so should be hidden from t he text dump
104 for (var i = 0; i < document.body.children.length; i++) { 104 for (var i = 0; i < document.body.children.length; i++) {
105 if (document.body.children[i] === logDiv) continue;
106
107 document.body.children[i].style.visibility = "hidden"; 105 document.body.children[i].style.visibility = "hidden";
108 } 106 }
109 } 107 }
110 } 108 }
111 109
112 // Add results element to document 110 // Add results element to document
113 document.body.appendChild(results); 111 document.body.appendChild(results);
114 112
115 if (self.testRunner) 113 if (self.testRunner)
116 testRunner.notifyDone(); 114 testRunner.notifyDone();
117 } 115 }
118 116
119 if (!document.body || document.readyState === 'loading') { 117 if (!document.body || document.readyState === 'loading') {
120 window.addEventListener('load', done); 118 window.addEventListener('load', done);
121 } else { 119 } else {
122 done(); 120 done();
123 } 121 }
124 }); 122 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698