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

Side by Side Diff: LayoutTests/inspector/console/console-uncaught-promise.html

Issue 670523002: DevTools: Fix flaky console-uncaught-promise.html test. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 2 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
« no previous file with comments | « no previous file | LayoutTests/inspector/console/console-uncaught-promise-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <html> 1 <html>
2 <head> 2 <head>
3 <script src="../../http/tests/inspector/inspector-test.js"></script> 3 <script src="../../http/tests/inspector/inspector-test.js"></script>
4 <script src="../../http/tests/inspector/console-test.js"></script> 4 <script src="../../http/tests/inspector/console-test.js"></script>
5 <script> 5 <script>
6 6
7 function runPromises(source) 7 function runPromises(source)
8 { 8 {
9 Promise.reject(new Error(source + ".err1")) 9 Promise.reject(new Error(source + ".err1"))
10 .then() 10 .then()
(...skipping 12 matching lines...) Expand all
23 m4 = m3.then(function() {}); // Unhandled. 23 m4 = m3.then(function() {}); // Unhandled.
24 }); 24 });
25 }); 25 });
26 }); 26 });
27 reject(new Error(source + ".err2")); 27 reject(new Error(source + ".err2"));
28 } 28 }
29 29
30 function onload() 30 function onload()
31 { 31 {
32 runPromises("onload"); 32 runPromises("onload");
33 runTest(); 33
34 if (window.testRunner) {
35 testRunner.dumpAsText();
36 testRunner.waitUntilDone();
37 }
38
39 // Run tests after all microtasks.
40 setTimeout(runTest, 0);
34 } 41 }
35 42
36 function runPromisesFromInspector() 43 function runPromisesFromInspector()
37 { 44 {
38 // setTimeout to cut off VM call frames from the stack trace. 45 // setTimeout to cut off VM call frames from the stack trace.
39 setTimeout(function timeout() { 46 setTimeout(function timeout() {
40 runPromises("inspector") 47 runPromises("inspector")
41 }, 0); 48 }, 0);
42 } 49 }
43 50
(...skipping 23 matching lines...) Expand all
67 </script> 74 </script>
68 </head> 75 </head>
69 76
70 <body onload="onload()"> 77 <body onload="onload()">
71 <p> 78 <p>
72 Tests that uncaught promise rejections are logged into console. 79 Tests that uncaught promise rejections are logged into console.
73 </p> 80 </p>
74 81
75 </body> 82 </body>
76 </html> 83 </html>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/inspector/console/console-uncaught-promise-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698