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

Side by Side Diff: LayoutTests/inspector-protocol/page/javascriptDialogEvents.html

Issue 18729002: Enable message delivering in inspector-protocol tests when on pause (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebase Created 7 years, 5 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/resource s/protocol-test.js"></script> 3 <script type="text/javascript" src="../../http/tests/inspector-protocol/resource s/protocol-test.js"></script>
4 <script> 4 <script>
5 5
6 window.addEventListener("beforeunload", onBeforeUnload); 6 window.addEventListener("beforeunload", onBeforeUnload);
7 7
8 function onBeforeUnload() 8 function onBeforeUnload()
9 { 9 {
10 window.removeEventListener("beforeunload", onBeforeUnload); 10 window.removeEventListener("beforeunload", onBeforeUnload);
11 return "beforeunload in javascriptDialogEvents"; 11 return "beforeunload in javascriptDialogEvents";
12 } 12 }
13 13
14 function test() 14 function test()
15 { 15 {
16 InspectorTest.eventHandler["Page.javascriptDialogOpening"] = onOpening; 16 InspectorTest.eventHandler["Page.javascriptDialogOpening"] = onOpening;
17 InspectorTest.eventHandler["Page.javascriptDialogClosed"] = onClosed; 17 InspectorTest.eventHandler["Page.javascriptDialogClosed"] = onClosed;
18 InspectorTest.sendCommand("Page.enable", {}); 18 InspectorTest.sendCommand("Page.enable", {});
19 19
20 function onOpening(event) 20 function onOpening(event)
21 { 21 {
22 InspectorTest.log("Opening with message: " + event.params.message); 22 InspectorTest.log("Opening with message: " + event.params.message);
23 } 23 }
24 function onClosed() 24 function onClosed()
25 { 25 {
26 InspectorTest.log("Closed"); 26 InspectorTest.log("Closed");
27 } 27 }
28 28
29 InspectorTest.sendCommand("Page.navigate", { "url": "nosuchurl" }); 29 InspectorTest.sendCommand("Page.navigate", { "url": "nosuchurl" });
30 InspectorTest.sendCommand("Runtime.evaluate", { "expression": "alert('alert' )" }); 30 InspectorTest.sendCommand("Runtime.evaluate", { "expression": "alert('alert' )" }, onDoneAlert);
31 InspectorTest.sendCommand("Runtime.evaluate", { "expression": "confirm('conf irm')" }); 31
32 InspectorTest.sendCommand("Runtime.evaluate", { "expression": "prompt('promp t')" }, onDone); 32 function onDoneAlert()
33 {
34 InspectorTest.sendCommand("Runtime.evaluate", { "expression": "confirm(' confirm')" }, onDoneConfirm);
35 }
36
37 function onDoneConfirm()
38 {
39 InspectorTest.sendCommand("Runtime.evaluate", { "expression": "prompt('p rompt')" }, onDone);
40 }
33 41
34 function onDone() 42 function onDone()
35 { 43 {
36 InspectorTest.completeTest(); 44 InspectorTest.completeTest();
37 } 45 }
38 } 46 }
39 47
40 </script> 48 </script>
41 </head> 49 </head>
42 <body onload="runTest()"> 50 <body onload="runTest()">
43 </body> 51 </body>
44 </html> 52 </html>
OLDNEW
« no previous file with comments | « LayoutTests/inspector-protocol/layers/layers-for-node.html ('k') | Source/core/testing/InspectorFrontendClientLocal.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698