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

Unified Diff: third_party/WebKit/LayoutTests/inspector-protocol/dom/dom-getFlattenedDocument.html

Issue 2633343003: Adds DOM.getFlatDocument which returns an array of nodes (Closed)
Patch Set: Fix headless browser test 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-getFlattenedDocument.html
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/dom/dom-getFlattenedDocument.html b/third_party/WebKit/LayoutTests/inspector-protocol/dom/dom-getFlattenedDocument.html
new file mode 100644
index 0000000000000000000000000000000000000000..ce76a3d1f468a024ba1ac6e4d7d97872ea8d6b45
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/inspector-protocol/dom/dom-getFlattenedDocument.html
@@ -0,0 +1,55 @@
+<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.getFlattenedDocument", {"depth": -1, "pierce": true}, onDocument);
+
+ function onDocument(response) {
+ function stabilize(key, value) {
+ var unstableKeys = ["backendNodeId", "documentURL", "baseURL", "frameId"];
+ if (unstableKeys.indexOf(key) !== -1)
+ return "<" + typeof(value) + ">";
+ return value;
+ }
+ InspectorTest.log(JSON.stringify(response, stabilize, 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