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

Side by Side Diff: third_party/WebKit/LayoutTests/resources/testharnessreport.js

Issue 2658093003: Suppress console messages for all testharness tests. (Closed)
Patch Set: rebaseline-cl Created 3 years, 10 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
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 *
11 * For more documentation about the callback functions and the 11 * For more documentation about the callback functions and the
12 * parameters they are called with see testharness.js 12 * parameters they are called with see testharness.js
13 */ 13 */
14 14
15 (function() { 15 (function() {
16 16
17 var output_document = document; 17 var output_document = document;
18 18
19 // Setup for WebKit JavaScript tests 19 // Setup for WebKit JavaScript tests
20 if (self.testRunner) { 20 if (self.testRunner) {
21 testRunner.dumpAsText(); 21 testRunner.dumpAsText();
22 testRunner.waitUntilDone(); 22 testRunner.waitUntilDone();
23 testRunner.setCanOpenWindows(); 23 testRunner.setCanOpenWindows();
24 testRunner.setCloseRemainingWindowsWhenComplete(true); 24 testRunner.setCloseRemainingWindowsWhenComplete(true);
25 testRunner.setDumpJavaScriptDialogs(false); 25 testRunner.setDumpJavaScriptDialogs(false);
26 testRunner.setDumpConsoleMessages(false);
26 } 27 }
27 28
28 // Disable the default output of testharness.js. The default output formats 29 // Disable the default output of testharness.js. The default output formats
29 // test results into an HTML table. When that table is dumped as text, no 30 // test results into an HTML table. When that table is dumped as text, no
30 // spacing between cells is preserved, and it is therefore not readable. By 31 // spacing between cells is preserved, and it is therefore not readable. By
31 // setting output to false, the HTML table will not be created. 32 // setting output to false, the HTML table will not be created.
32 // Also, disable timeout (except for explicit timeout), since the Blink 33 // Also, disable timeout (except for explicit timeout), since the Blink
33 // layout test runner has its own timeout mechanism. 34 // layout test runner has its own timeout mechanism.
34 // See: https://github.com/w3c/testharness.js/blob/master/docs/api.md#setup 35 // See: https://github.com/w3c/testharness.js/blob/master/docs/api.md#setup
35 setup({ 36 setup({
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
240 // another completion callback might generate more results. So, we 241 // another completion callback might generate more results. So, we
241 // don't dump the results immediately. 242 // don't dump the results immediately.
242 setTimeout(done, 0); 243 setTimeout(done, 0);
243 } else { 244 } else {
244 // Parsing the test HTML isn't finished yet. 245 // Parsing the test HTML isn't finished yet.
245 window.addEventListener('load', done); 246 window.addEventListener('load', done);
246 } 247 }
247 }); 248 });
248 249
249 })(); 250 })();
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698