Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / inspector-protocol / page / javascriptDialogEvents.html
blob8d8303aeef61eaf82b322dfa67f0d65afd87e159
1 <html>
2 <head>
3 <script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script>
4 <script>
6 window.onbeforeunload = onBeforeUnload;
8 function onBeforeUnload()
10 window.removeEventListener("beforeunload", onBeforeUnload);
11 return "beforeunload in javascriptDialogEvents";
14 function test()
16 InspectorTest.eventHandler["Page.javascriptDialogOpening"] = onOpening;
17 InspectorTest.eventHandler["Page.javascriptDialogClosed"] = onClosed;
18 InspectorTest.sendCommand("Page.enable", {});
20 function onOpening(event)
22 InspectorTest.log("Opening dialog: type=" + event.params.type + "; message=" + event.params.message);
25 function onClosed(event)
27 InspectorTest.log("Closed dialog: result=" + event.params.result);
30 InspectorTest.sendCommand("Page.navigate", { "url": "http://nosuchurl" });
31 InspectorTest.sendCommand("Runtime.evaluate", { "expression": "alert('alert')" }, onDoneAlert);
33 function onDoneAlert()
35 InspectorTest.sendCommand("Runtime.evaluate", { "expression": "confirm('confirm')" }, onDoneConfirm);
38 function onDoneConfirm()
40 InspectorTest.sendCommand("Runtime.evaluate", { "expression": "prompt('prompt')" }, onDone);
43 function onDone()
45 InspectorTest.completeTest();
49 </script>
50 </head>
51 <body onload="runTest()">
52 </body>
53 </html>