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

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

Issue 2898503002: Reenable feature policy control over fullscreen (Closed)
Patch Set: Fixing last test nits Created 3 years, 4 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 is intended for vendors to implement code needed to integrate 2 * This file is intended for vendors to implement code needed to integrate
3 * testharness.js tests with their own test systems. 3 * testharness.js tests with their own test systems.
4 * 4 *
5 * Typically such integration will attach callbacks when each test is 5 * Typically such integration will attach callbacks when each test is
6 * has run, using add_result_callback(callback(test)), or when the whole test 6 * has run, using add_result_callback(callback(test)), or when the whole test
7 * file has completed, using add_completion_callback(callback(tests, 7 * file has completed, using add_completion_callback(callback(tests,
8 * harness_status)). 8 * harness_status)).
9 * 9 *
10 * For more documentation about the callback functions and the 10 * For more documentation about the callback functions and the
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 setTimeout(loadAutomationScript, 0); 66 setTimeout(loadAutomationScript, 0);
67 } 67 }
68 } 68 }
69 69
70 /** Checks whether the current path is a manual test in WPT. */ 70 /** Checks whether the current path is a manual test in WPT. */
71 function isWPTManualTest() { 71 function isWPTManualTest() {
72 // Here we assume that if wptserve is running, then the hostname 72 // Here we assume that if wptserve is running, then the hostname
73 // is web-platform.test. 73 // is web-platform.test.
74 const path = location.pathname; 74 const path = location.pathname;
75 if (location.hostname == 'web-platform.test' && 75 if (location.hostname == 'web-platform.test' &&
76 /.*-manual(\.https)?\.html$/.test(path)) { 76 /.*-manual(\.sub)?(\.https)?\.html$/.test(path)) {
77 return true; 77 return true;
78 } 78 }
79 // If the file is loaded locally via file://, it must include 79 // If the file is loaded locally via file://, it must include
80 // the wpt directory in the path. 80 // the wpt directory in the path.
81 return /\/external\/wpt\/.*-manual(\.https)?\.html$/.test(path); 81 return /\/external\/wpt\/.*-manual(\.sub)?(\.https)?\.html$/.test(path);
82 } 82 }
83 83
84 /** Loads the WPT automation script for the current test, if applicable. */ 84 /** Loads the WPT automation script for the current test, if applicable. */
85 function loadAutomationScript() { 85 function loadAutomationScript() {
86 const pathAndBase = pathAndBaseNameInWPT(); 86 const pathAndBase = pathAndBaseNameInWPT();
87 if (!pathAndBase) { 87 if (!pathAndBase) {
88 return; 88 return;
89 } 89 }
90 let automationPath = location.pathname.replace( 90 let automationPath = location.pathname.replace(
91 /\/external\/wpt\/.*$/, '/external/wpt_automation'); 91 /\/external\/wpt\/.*$/, '/external/wpt_automation');
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after
338 function failureMetricSummary(resultCounts) { 338 function failureMetricSummary(resultCounts) {
339 const total = resultCounts[0] + resultCounts[1] + resultCounts[2] + resu ltCounts[3]; 339 const total = resultCounts[0] + resultCounts[1] + resultCounts[2] + resu ltCounts[3];
340 return `Found ${total} tests;` + 340 return `Found ${total} tests;` +
341 ` ${resultCounts[0]} PASS,` + 341 ` ${resultCounts[0]} PASS,` +
342 ` ${resultCounts[1]} FAIL,` + 342 ` ${resultCounts[1]} FAIL,` +
343 ` ${resultCounts[2]} TIMEOUT,` + 343 ` ${resultCounts[2]} TIMEOUT,` +
344 ` ${resultCounts[3]} NOTRUN.\n`; 344 ` ${resultCounts[3]} NOTRUN.\n`;
345 } 345 }
346 346
347 })(); 347 })();
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698