3 <script type=
"text/javascript" src=
"../../http/tests/inspector-protocol/inspector-protocol-test.js"></script>
10 frame
= document
.createElement("iframe");
11 frame
.src
= "../resources/blank.html";
12 document
.body
.appendChild(frame
);
16 frame
.src
= "about:blank";
20 document
.body
.removeChild(frame
);
25 InspectorTest
.eventHandler
["Page.frameAttached"] = onAttached
;
26 InspectorTest
.eventHandler
["Page.frameStartedLoading"] = onStartedLoading
;
27 InspectorTest
.eventHandler
["Page.frameNavigated"] = onNavigated
;
28 InspectorTest
.eventHandler
["Page.frameDetached"] = onDetached
;
29 InspectorTest
.sendCommand("Page.enable", {});
33 InspectorTest
.log("Attached");
35 function onStartedLoading()
37 InspectorTest
.log("Started loading");
39 function onNavigated(response
)
41 InspectorTest
.log("Navigated");
42 var frame
= response
.params
.frame
;
43 if (frame
.url
== "about:blank")
44 InspectorTest
.sendCommand("Runtime.evaluate", { "expression": "remove()" });
46 InspectorTest
.sendCommand("Runtime.evaluate", { "expression": "navigate()" });
50 InspectorTest
.log("Detached");
51 InspectorTest
.completeTest();
54 InspectorTest
.sendCommand("Runtime.evaluate", { "expression": "append()" });
59 <body onload=
"runTest()">