Index: third_party/WebKit/LayoutTests/inspector-protocol/dom/dom-relayout-boundary.html |
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/dom/dom-relayout-boundary.html b/third_party/WebKit/LayoutTests/inspector-protocol/dom/dom-relayout-boundary.html |
deleted file mode 100644 |
index acfdc7c99ba55c6241c0bc3e709cf43cc4324c85..0000000000000000000000000000000000000000 |
--- a/third_party/WebKit/LayoutTests/inspector-protocol/dom/dom-relayout-boundary.html |
+++ /dev/null |
@@ -1,137 +0,0 @@ |
-<html> |
-<head> |
-<style> |
-.relayout-boundary { |
- width: 200px; |
- height: 40px; |
- overflow: hidden; |
-} |
- |
-</style> |
-<script type="text/javascript" src="../../http/tests/inspector-protocol/resources/inspector-protocol-test.js"></script> |
-<script type="text/javascript"> |
- |
-function test() |
-{ |
- var nodeByIdAttribute = {}; |
- var nodeById = {}; |
- |
- getDocument(); |
- |
- function getAttribute(node, attribute) |
- { |
- if (!node.attributes) |
- return; |
- for (var i = 0; i < node.attributes.length; i += 2) { |
- if (node.attributes[i] === attribute) |
- return node.attributes[i + 1]; |
- } |
- } |
- |
- function nodeLabel(node) |
- { |
- var result = node.localName; |
- var id = getAttribute(node, "id"); |
- if (id) |
- result += "#" + id; |
- return result; |
- } |
- |
- function addNode(node) |
- { |
- nodeById[node.nodeId] = node; |
- var idAttribute = getAttribute(node, "id"); |
- if (idAttribute) |
- nodeByIdAttribute[idAttribute] = node; |
- if (node.children) |
- addNodes(node.children); |
- } |
- |
- function addNodes(nodes) |
- { |
- nodes.forEach(addNode); |
- } |
- |
- InspectorTest.eventHandler["DOM.setChildNodes"] = function setChildNodes(messageObject) |
- { |
- addNodes(messageObject.params.nodes); |
- }; |
- |
- function getDocument() |
- { |
- // We must first get the document so that later on we may get sensible nodeIds. |
- step({ |
- command: "DOM.getDocument", |
- parameters: {}, |
- callback: getAllNodes |
- }); |
- }; |
- |
- function getAllNodes(error, result) |
- { |
- addNode(result.root); |
- step({ |
- command: "DOM.requestChildNodes", |
- parameters: {"nodeId": result.root.nodeId, "depth": -1}, |
- callback: dumpRelayoutBoundary.bind(this, 0) |
- }); |
- }; |
- |
- var nodeIdsToTest = [ |
- "outer", |
- "boundary", |
- "inner", |
- "hidden" |
- ]; |
- |
- function dumpRelayoutBoundary(nextId) |
- { |
- if (nextId >= nodeIdsToTest.length) { |
- InspectorTest.completeTest(); |
- return; |
- } |
- var node = nodeByIdAttribute[nodeIdsToTest[nextId]]; |
- function dumpResultsAndContinue(error, result) |
- { |
- var text; |
- if (error) { |
- text = error; |
- } else { |
- var boundaryNode = nodeById[result.nodeId]; |
- text = boundaryNode ? nodeLabel(boundaryNode) : "null"; |
- } |
- InspectorTest.log("Relayout boundary for " + nodeLabel(node) + " is: " + text); |
- dumpRelayoutBoundary(nextId + 1); |
- } |
- step({ |
- command: "DOM.getRelayoutBoundary", |
- parameters: {"nodeId": node.nodeId}, |
- callback: dumpResultsAndContinue |
- }); |
- } |
- |
- function step(test) |
- { |
- InspectorTest.sendCommand(test.command, test.parameters, function(messageObject) { |
- if (test.callback) |
- test.callback(messageObject.error && messageObject.error.message, messageObject.result); |
- }); |
- }; |
- setTimeout(InspectorTest.completeTest.bind(InspectorTest), 3400); |
-}; |
- |
-window.addEventListener("DOMContentLoaded", function () { |
- runTest(); |
-}, false); |
-</script> |
-</head> |
-<body> |
-<div id="outer"></div> |
-<div class="relayout-boundary" id="boundary"> |
- <div id="inner"></div> |
- <div style="display: none"> |
- <div id="hidden"></div> |
- </div> |
-</div> |
-</body> |
-</html> |