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

Side by Side Diff: third_party/WebKit/LayoutTests/inspector-protocol/page/frameAttachedDetached.html

Issue 2942573003: [DevTools] New harness for inspector-protocol layout tests (Closed)
Patch Set: Protocol -> dp Created 3 years, 6 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
(Empty)
1 <html>
2 <head>
3 <script type="text/javascript" src="../../http/tests/inspector-protocol/inspecto r-protocol-test.js"></script>
4 <script>
5
6 var frame;
7
8 function append()
9 {
10 frame = document.createElement("iframe");
11 frame.src = "../resources/blank.html";
12 document.body.appendChild(frame);
13 }
14
15 function navigate() {
16 frame.src = "about:blank";
17 }
18
19 function remove() {
20 document.body.removeChild(frame);
21 }
22
23 function test()
24 {
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", {});
30
31 function onAttached()
32 {
33 InspectorTest.log("Attached");
34 }
35 function onStartedLoading()
36 {
37 InspectorTest.log("Started loading");
38 }
39 function onNavigated(response)
40 {
41 InspectorTest.log("Navigated");
42 var frame = response.params.frame;
43 if (frame.url == "about:blank")
44 InspectorTest.sendCommand("Runtime.evaluate", { "expression": "remov e()" });
45 else
46 InspectorTest.sendCommand("Runtime.evaluate", { "expression": "navig ate()" });
47 }
48 function onDetached()
49 {
50 InspectorTest.log("Detached");
51 InspectorTest.completeTest();
52 }
53
54 InspectorTest.sendCommand("Runtime.evaluate", { "expression": "append()" });
55 }
56
57 </script>
58 </head>
59 <body onload="runTest()">
60 </body>
61 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698