Index: LayoutTests/inspector/elements/relayout-boundary.html |
diff --git a/LayoutTests/inspector/elements/relayout-boundary.html b/LayoutTests/inspector/elements/relayout-boundary.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..e81ff724751306cf26950218216fb17435e60e4e |
--- /dev/null |
+++ b/LayoutTests/inspector/elements/relayout-boundary.html |
@@ -0,0 +1,59 @@ |
+<html> |
pfeldman
2013/09/06 13:35:51
Lets make a protocol test for this and land no UI
|
+<head> |
+<style> |
+.relayout-boundary { |
+ width: 200px; |
+ height: 40px; |
+ overflow: hidden; |
+} |
+ |
+</style> |
+<script src="../../http/tests/inspector/inspector-test.js"></script> |
+<script src="../../http/tests/inspector/elements-test.js"></script> |
+<script> |
+function test() |
+{ |
+ var nodeIdsToTest = [ |
+ "outer", |
+ "boundary", |
+ "inner", |
+ "hidden" |
+ ]; |
+ function iterateOverIds(nextId) |
+ { |
+ if (nextId >= nodeIdsToTest.length) |
+ InspectorTest.completeTest(); |
+ function dumpResultsAndContinue(originalNode, error, foundNodeId) |
+ { |
+ var result; |
+ if (error) |
+ result = error; |
+ else { |
+ var foundNode = WebInspector.domAgent.nodeForId(foundNodeId); |
+ result = foundNode ? foundNode.appropriateSelectorFor() : "null"; |
+ } |
+ InspectorTest.addResult("Relayout boundary for " + originalNode.appropriateSelectorFor() + " is: " + result); |
+ iterateOverIds(nextId + 1); |
+ } |
+ function processNode(node) |
+ { |
+ node.findRelayoutBoundary(dumpResultsAndContinue.bind(this, node)); |
+ } |
+ InspectorTest.nodeWithId(nodeIdsToTest[nextId], processNode); |
+ |
+ } |
+ iterateOverIds(0); |
+} |
+ |
+</script> |
+</head> |
+<body onload="runTest()"> |
+<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> |