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

Side by Side Diff: LayoutTests/inspector/minimum-size.html

Issue 214663005: [DevTools] Add preferred size to WebInspector.View. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Two methods Created 6 years, 8 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 unified diff | Download patch
« no previous file with comments | « no previous file | LayoutTests/inspector/minimum-size-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <html> 1 <html>
2 <head> 2 <head>
3 <script src="../http/tests/inspector/inspector-test.js"></script> 3 <script src="../http/tests/inspector/inspector-test.js"></script>
4 <script> 4 <script>
5 5
6 function test() 6 function test()
7 { 7 {
8 function showRootSplitView(splitView) 8 function showRootSplitView(splitView)
9 { 9 {
10 splitView.element.style.position = "absolute"; 10 splitView.element.style.position = "absolute";
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 var thirdSidebarView = new WebInspector.View(); 89 var thirdSidebarView = new WebInspector.View();
90 thirdSidebarView.setMinimumSize(80, 80); 90 thirdSidebarView.setMinimumSize(80, 80);
91 thirdSidebarView.show(childSplitView.sidebarElement()); 91 thirdSidebarView.show(childSplitView.sidebarElement());
92 views["thirdSidebarView"] = thirdSidebarView; 92 views["thirdSidebarView"] = thirdSidebarView;
93 dumpBoundingBoxes(views); 93 dumpBoundingBoxes(views);
94 94
95 InspectorTest.addResult("Swapping main and sidebar"); 95 InspectorTest.addResult("Swapping main and sidebar");
96 splitView.setSecondIsSidebar(false); 96 splitView.setSecondIsSidebar(false);
97 dumpBoundingBoxes(views); 97 dumpBoundingBoxes(views);
98 98
99 InspectorTest.addResult("Arranging preferred sizes");
100 firstSidebarView.setMinimumAndPreferredSizes(50, 50, 100, 100);
101 mainView.setMinimumAndPreferredSizes(50, 50, 200, 200);
102 thirdSidebarView.setMinimumAndPreferredSizes(50, 50, 100, 100);
103 splitView.setSidebarSize(260);
104 dumpBoundingBoxes(views);
105
106 InspectorTest.addResult("Less than sidebar preferred size");
107 splitView.setSidebarSize(80);
108 dumpBoundingBoxes(views);
109
110 InspectorTest.addResult("Size changes proportionally");
111 splitView.setSidebarSize(320);
112 dumpBoundingBoxes(views);
113
114 InspectorTest.addResult("Manual resize inside child split view");
115 childSplitView.setSidebarSize(50);
116 dumpBoundingBoxes(views);
117
118 InspectorTest.addResult("Manual resize inside child split view");
119 childSplitView.setSidebarSize(120);
120 dumpBoundingBoxes(views);
121
122 InspectorTest.addResult("Child split view gets more space");
123 splitView.setSidebarSize(170);
124 dumpBoundingBoxes(views);
125
126 InspectorTest.addResult("Child split view gets less space");
127 splitView.setSidebarSize(360);
128 dumpBoundingBoxes(views);
129
99 InspectorTest.completeTest(); 130 InspectorTest.completeTest();
100 } 131 }
101 </script> 132 </script>
102 </head> 133 </head>
103 <body onload="runTest()"> 134 <body onload="runTest()">
104 <p>Tests how view minimum size works.</p> 135 <p>Tests how view minimum size works.</p>
105 </body> 136 </body>
106 </html> 137 </html>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/inspector/minimum-size-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698