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

Side by Side Diff: LayoutTests/fast/dom/Window/post-message-crash.html

Issue 183703003: Remove more testRunner.display() calls from LayoutTests (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Ditch fast/text/font-initial changes too Created 6 years, 9 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 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <html>
3 <body> 3 <body>
4 4
5 <p>This ensures that postMessage called in a callback does not crash. 5 <p>This ensures that postMessage called in a callback does not crash.
6 6
7 <pre>FAIL</pre> 7 <pre>FAIL</pre>
8 8
9 <script src="../../../resources/run-after-display.js"></script>
9 <script> 10 <script>
10 if (window.testRunner) { 11 if (window.testRunner) {
11 testRunner.dumpAsText(); 12 testRunner.dumpAsText();
12 testRunner.waitUntilDone(); 13 testRunner.waitUntilDone();
13 } 14 }
14 15
15 var n = 0; 16 var n = 0;
16 17
17 window.onerror = function() { 18 window.onerror = function() {
18 if (++n === 2) { 19 if (++n === 2) {
19 document.querySelector('pre').textContent = 'PASS'; 20 document.querySelector('pre').textContent = 'PASS';
20 if (window.testRunner) 21 if (window.testRunner)
21 testRunner.notifyDone(); 22 testRunner.notifyDone();
22 } 23 }
23 return true; 24 return true;
24 }; 25 };
25 26
26 requestAnimationFrame(postMessage); 27 requestAnimationFrame(function() {
28 postMessage();
29 runAfterDisplay(function() {
30 setTimeout(function() {
31 if (window.testRunner)
32 testRunner.notifyDone();
33 }, 50);
34 });
35 });
27 setTimeout(postMessage); 36 setTimeout(postMessage);
28 37
29 if (window.testRunner)
30 testRunner.display();
31
32 setTimeout(function() {
33 if (window.testRunner)
34 testRunner.notifyDone();
35 }, 50);
36
37 </script> 38 </script>
38 </body> 39 </body>
39 </html> 40 </html>
OLDNEW
« no previous file with comments | « LayoutTests/fast/css/relative-positioned-block-crash.html ('k') | LayoutTests/fast/dynamic/layer-no-longer-paginated.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698