Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / inspector-protocol / page / frameAttachedDetached.html
blob2c92ae31c719ccb634be90c886f80ebb2467bd41
1 <html>
2 <head>
3 <script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script>
4 <script>
6 var frame;
8 function append()
10 frame = document.createElement("iframe");
11 frame.src = "../resources/blank.html";
12 document.body.appendChild(frame);
15 function navigate() {
16 frame.src = "about:blank";
19 function remove() {
20 document.body.removeChild(frame);
23 function test()
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", {});
31 function onAttached()
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()" });
45 else
46 InspectorTest.sendCommand("Runtime.evaluate", { "expression": "navigate()" });
48 function onDetached()
50 InspectorTest.log("Detached");
51 InspectorTest.completeTest();
54 InspectorTest.sendCommand("Runtime.evaluate", { "expression": "append()" });
57 </script>
58 </head>
59 <body onload="runTest()">
60 </body>
61 </html>