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

Unified Diff: LayoutTests/inspector/elements/relayout-boundary.html

Issue 23201018: DevTools: add "Jump to Relayout Boundary" context menu item in Elements panel (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 4 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: 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>
« no previous file with comments | « no previous file | LayoutTests/inspector/elements/relayout-boundary-expected.txt » ('j') | Source/core/rendering/RenderObject.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698