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

Unified 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/inspector-protocol/dom/dom-getFlatDocument.html
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/dom/dom-getFlatDocument.html b/third_party/WebKit/LayoutTests/inspector-protocol/dom/dom-getFlatDocument.html
new file mode 100644
index 0000000000000000000000000000000000000000..2165684ad4c7aaa637986bf8d37712b38920bd2e
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/inspector-protocol/dom/dom-getFlatDocument.html
@@ -0,0 +1,54 @@
+<html>
+<head>
+<script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script>
+<script>
+
+function test()
+{
+ InspectorTest.sendCommand("DOM.enable", {});
+ InspectorTest.sendCommandOrDie("DOM.getFlatDocument", {"depth": -1, "pierce": true}, onDocument);
+
+ function onDocument(response) {
+ // The frameIds change each run.
+ for (var i = 0; i < response.nodes.length; i++) {
+ if ("frameId" in response.nodes[i])
+ response.nodes[i].frameId = "?";
+ }
+ InspectorTest.log(JSON.stringify(response, null, 2));
+ InspectorTest.completeTest();
+ }
+}
+
+</script>
+<template id="shadow-template">
+<style>
+:host {
+ color: red;
+}
+</style>
+<div></div><h1>Hi from a template!</h1></div>
+</template>
+</head>
+<body class="body-class">
+ <div id="A"> A
+ <div id="B"> B
+ <div id="C"> C
+ <div id="D"> D
+ <div id="E"> E
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+
+ <iframe src="../dom/resources/simple-iframe.html" width="400" height="200"></iframe>
+ <div id="shadow-host"></div>
+ <script type="text/javascript">
+ var host = document.querySelector("#shadow-host").createShadowRoot();
+ var template = document.querySelector("#shadow-template");
+ host.appendChild(template.content);
+ template.remove();
+ window.onload = runTest;
+ </script>
+</body>
+</html>

Powered by Google App Engine
This is Rietveld 408576698