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

Side by Side Diff: third_party/WebKit/LayoutTests/inspector-protocol/runtime/runtime-console-log-doesnt-run-microtasks.html

Issue 2942573003: [DevTools] New harness for inspector-protocol layout tests (Closed)
Patch Set: Protocol -> dp Created 3 years, 6 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 <html> 1 <html>
2 <head> 2 <head>
3 <script type="text/javascript" src="../../http/tests/inspector-protocol/inspecto r-protocol-test.js"></script> 3 <script type="text/javascript" src="../../http/tests/inspector-protocol/resource s/inspector-protocol-test.js"></script>
4 <script> 4 <script>
5 5
6 function testFunction() 6 function testFunction()
7 { 7 {
8 Promise.resolve().then(function(){ console.log(239); }); 8 Promise.resolve().then(function(){ console.log(239); });
9 console.log(42); 9 console.log(42);
10 console.log(43); 10 console.log(43);
11 } 11 }
12 12
13 function test() 13 function test()
14 { 14 {
15 InspectorTest.sendCommandOrDie("Runtime.enable", {}); 15 InspectorTest.sendCommandOrDie("Runtime.enable", {});
16 InspectorTest.eventHandler["Runtime.consoleAPICalled"] = messageAdded; 16 InspectorTest.eventHandler["Runtime.consoleAPICalled"] = messageAdded;
17 InspectorTest.sendCommandOrDie("Runtime.evaluate", { "expression": "testFunc tion()" }); 17 InspectorTest.sendCommandOrDie("Runtime.evaluate", { "expression": "testFunc tion()" });
18 InspectorTest.sendCommandOrDie("Runtime.evaluate", { "expression": "setTimeo ut(() => console.log(\"finished\"), 0)" }); 18 InspectorTest.sendCommandOrDie("Runtime.evaluate", { "expression": "setTimeo ut(() => console.log(\"finished\"), 0)" });
19 19
20 function messageAdded(result) 20 function messageAdded(result)
21 { 21 {
22 InspectorTest.logObject(result.params.args[0]); 22 InspectorTest.logObject(result.params.args[0]);
23 if (result.params.args[0].value === "finished") 23 if (result.params.args[0].value === "finished")
24 InspectorTest.completeTest(); 24 InspectorTest.completeTest();
25 } 25 }
26 } 26 }
27 </script> 27 </script>
28 </head> 28 </head>
29 <body onLoad="runTest();"> 29 <body onLoad="runTest();">
30 Check that console.log doesn't run microtasks. 30 Check that console.log doesn't run microtasks.
31 </body> 31 </body>
32 </html> 32 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698