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

Side by Side Diff: third_party/WebKit/LayoutTests/fullscreen/full-screen-test.js

Issue 2586243002: Fixed flaky fullscreen video test. (Closed)
Patch Set: Return early from endTest() if already called. Created 4 years 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 var consoleDiv = null; 1 var consoleDiv = null;
2 var printFullTestDetails = true; // This is optionaly switched of by test whose tested values can differ. (see disableFullTestDetailsPrinting()) 2 var printFullTestDetails = true; // This is optionaly switched of by test whose tested values can differ. (see disableFullTestDetailsPrinting())
3 3
4 logConsole(); 4 logConsole();
5 5
6 if (window.testRunner) { 6 if (window.testRunner) {
7 if (window.runPixelTests) 7 if (window.runPixelTests)
8 testRunner.dumpAsTextWithPixelResults(); 8 testRunner.dumpAsTextWithPixelResults();
9 else 9 else
10 testRunner.dumpAsText(); 10 testRunner.dumpAsText();
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 130
131 function waitForEventTestAndEnd(element, eventName, testFuncString) 131 function waitForEventTestAndEnd(element, eventName, testFuncString)
132 { 132 {
133 waitForEventAndTest(element, eventName, testFuncString, true); 133 waitForEventAndTest(element, eventName, testFuncString, true);
134 } 134 }
135 135
136 var testEnded = false; 136 var testEnded = false;
137 137
138 function endTest() 138 function endTest()
139 { 139 {
140 if (testEnded)
141 return;
140 consoleWrite("END OF TEST"); 142 consoleWrite("END OF TEST");
141 testEnded = true; 143 testEnded = true;
142 if (window.testRunner) 144 if (window.testRunner)
143 testRunner.notifyDone(); 145 testRunner.layoutAndPaintAsyncThen(() => testRunner.notifyDone());
144 } 146 }
145 147
146 function logResult(success, text) 148 function logResult(success, text)
147 { 149 {
148 if (success) 150 if (success)
149 consoleWrite(text + " <span style='color:green'>OK</span>"); 151 consoleWrite(text + " <span style='color:green'>OK</span>");
150 else 152 else
151 consoleWrite(text + " <span style='color:red'>FAIL</span>"); 153 consoleWrite(text + " <span style='color:red'>FAIL</span>");
152 } 154 }
153 155
154 function consoleWrite(text) 156 function consoleWrite(text)
155 { 157 {
156 if (testEnded) 158 if (testEnded)
157 return; 159 return;
158 logConsole().innerHTML += text + "<br>"; 160 logConsole().innerHTML += text + "<br>";
159 } 161 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698