Web Inspector: Page: don't allow the domain to be disabled
[WebKit-https.git] / LayoutTests / inspector / page / frameScheduledNavigation.html
1 <html>
2 <head>
3 <script src="../../http/tests/inspector/resources/protocol-test.js"></script>
4 <script>
5
6 function load()
7 {
8     document.querySelector("iframe").src = "resources/blank.html";
9 }
10
11 function test()
12 {
13     InspectorProtocol.eventHandler["Page.frameScheduledNavigation"] = onScheduled;
14     InspectorProtocol.eventHandler["Page.frameStartedLoading"] = onStarted;
15     InspectorProtocol.eventHandler["Page.frameClearedScheduledNavigation"] = onCleared;
16
17     function onScheduled(msg)
18     {
19         ProtocolTest.log("Scheduled navigation with delay " + msg.params.delay);
20     }
21
22     function onStarted(msg)
23     {
24         ProtocolTest.log("Started loading");
25         ProtocolTest.wasStarted = true;
26         if (ProtocolTest.wasCleared)
27             ProtocolTest.completeTest();
28     }
29
30     function onCleared(msg)
31     {
32         ProtocolTest.log("Cleared scheduled navigation");
33         ProtocolTest.wasCleared = true;
34         if (ProtocolTest.wasStarted)
35             ProtocolTest.completeTest();
36     }
37
38     InspectorProtocol.sendCommand("Runtime.evaluate", { "expression": "load()" });
39 }
40
41 </script>
42 </head>
43 <body onload="runTest()">
44 <iframe>
45 </body>
46 </html>