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

Unified Diff: third_party/WebKit/LayoutTests/inspector-protocol/dom/dom-getNodeForLocation-skip-shadow.html

Issue 2763913002: Allow DOM.getNodeForLocation to skip to nearest non-shadow ancestor (Closed)
Patch Set: Use Common.moduleSettings value to in/exclude UA shadow dom Created 3 years, 9 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-getNodeForLocation-skip-shadow.html
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/dom/dom-getNodeForLocation-skip-shadow.html b/third_party/WebKit/LayoutTests/inspector-protocol/dom/dom-getNodeForLocation-skip-shadow.html
new file mode 100644
index 0000000000000000000000000000000000000000..eb417855f2595971654b151c04de4aa42ef67d67
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/inspector-protocol/dom/dom-getNodeForLocation-skip-shadow.html
@@ -0,0 +1,42 @@
+<html>
+<head>
+<script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script>
+<script>
+
+function test()
+{
+ var nodeInfo = {};
+ InspectorTest.eventHandler["DOM.setChildNodes"] = setChildNodes;
+ InspectorTest.sendCommand("DOM.enable", {});
+ InspectorTest.sendCommand("DOM.getNodeForLocation", { "x": 10, "y": 10, "includeUserAgentShadowDOM": false }, onGetNodeForLocation);
+
+ function onGetNodeForLocation(message)
+ {
+ if (message.error) {
+ InspectorTest.log(message.error.message);
+ InspectorTest.completeTest();
+ return;
+ }
+ var nodeId = message.result.nodeId;
+ InspectorTest.logObject(nodeInfo[nodeId], "Node: ", ["backendNodeId", "parentId", "nodeId"]);
+ InspectorTest.completeTest();
+ }
+
+ function setChildNodes(message)
+ {
+ var nodes = message.params.nodes;
+ for (var i = 0; i < nodes.length; ++i) {
+ nodeInfo[nodes[i].nodeId] = nodes[i];
+ delete nodes[i].nodeId;
+ }
+ }
+}
+
+</script>
+</head>
+<body onload="runTest()">
+<form action="#">
+ <input type="text" style="position:absolute;top:0;left:0;width:100;height:100" />
+</form>
+</body>
+</html>

Powered by Google App Engine
This is Rietveld 408576698