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

Side by Side Diff: third_party/WebKit/LayoutTests/inspector-protocol/dom/dom-getFlatDocument.html

Issue 2633343003: Adds DOM.getFlatDocument which returns an array of nodes (Closed)
Patch Set: Created 3 years, 11 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 function test()
7 {
8 InspectorTest.sendCommand("DOM.enable", {});
9 InspectorTest.sendCommandOrDie("DOM.getFlatDocument", {"depth": -1, "pierce" : true}, onDocument);
10
11 function onDocument(response) {
12 // The frameIds change each run.
13 for (var i = 0; i < response.nodes.length; i++) {
14 if ("frameId" in response.nodes[i])
15 response.nodes[i].frameId = "?";
16 }
17 InspectorTest.log(JSON.stringify(response, null, 2));
18 InspectorTest.completeTest();
19 }
20 }
21
22 </script>
23 <template id="shadow-template">
24 <style>
25 :host {
26 color: red;
27 }
28 </style>
29 <div></div><h1>Hi from a template!</h1></div>
30 </template>
31 </head>
32 <body class="body-class">
33 <div id="A"> A
34 <div id="B"> B
35 <div id="C"> C
36 <div id="D"> D
37 <div id="E"> E
38 </div>
39 </div>
40 </div>
41 </div>
42 </div>
43
44 <iframe src="../dom/resources/simple-iframe.html" width="400" height="200">< /iframe>
45 <div id="shadow-host"></div>
46 <script type="text/javascript">
47 var host = document.querySelector("#shadow-host").createShadowRoot();
48 var template = document.querySelector("#shadow-template");
49 host.appendChild(template.content);
50 template.remove();
51 window.onload = runTest;
52 </script>
53 </body>
54 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698