| OLD | NEW |
| 1 <html> | 1 <html> |
| 2 <head> | 2 <head> |
| 3 | 3 |
| 4 <style> | 4 <style> |
| 5 #border-box { | 5 #border-box { |
| 6 box-sizing: border-box; | 6 box-sizing: border-box; |
| 7 width: 55px; | 7 width: 55px; |
| 8 height: 55px; | 8 height: 55px; |
| 9 margin: 1px; | 9 margin: 1px; |
| 10 padding: 7px; | 10 padding: 7px; |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 } | 70 } |
| 71 | 71 |
| 72 InspectorTest.runTestSuite([ | 72 InspectorTest.runTestSuite([ |
| 73 function testBorderBoxInit1(next) | 73 function testBorderBoxInit1(next) |
| 74 { | 74 { |
| 75 InspectorTest.selectNodeAndWaitForStyles("border-box", next); | 75 InspectorTest.selectNodeAndWaitForStyles("border-box", next); |
| 76 }, | 76 }, |
| 77 | 77 |
| 78 function testBorderBoxInit2(next) | 78 function testBorderBoxInit2(next) |
| 79 { | 79 { |
| 80 section = WebInspector.panels.elements.sidebarPanes.metrics; | 80 section = WebInspector.inspectorView.panel("elements").sidebarPanes.
metrics; |
| 81 section.expand(); | 81 section.expand(); |
| 82 InspectorTest.runAfterPendingDispatches(next); | 82 InspectorTest.runAfterPendingDispatches(next); |
| 83 }, | 83 }, |
| 84 | 84 |
| 85 function testInitialBorderBoxMetrics(next) | 85 function testInitialBorderBoxMetrics(next) |
| 86 { | 86 { |
| 87 var spanElements = section.element.getElementsByClassName("content")
[0].getElementsByTagName("span"); | 87 var spanElements = section.element.getElementsByClassName("content")
[0].getElementsByTagName("span"); |
| 88 contentWidthElement = spanElements[0]; | 88 contentWidthElement = spanElements[0]; |
| 89 contentHeightElement = spanElements[1]; | 89 contentHeightElement = spanElements[1]; |
| 90 InspectorTest.addResult("=== Initial border-box ==="); | 90 InspectorTest.addResult("=== Initial border-box ==="); |
| (...skipping 11 matching lines...) Expand all Loading... |
| 102 next(); | 102 next(); |
| 103 }, | 103 }, |
| 104 | 104 |
| 105 function testContentBoxInit1(next) | 105 function testContentBoxInit1(next) |
| 106 { | 106 { |
| 107 InspectorTest.selectNodeWithId("content-box", next); | 107 InspectorTest.selectNodeWithId("content-box", next); |
| 108 }, | 108 }, |
| 109 | 109 |
| 110 function testContentBoxInit2(next) | 110 function testContentBoxInit2(next) |
| 111 { | 111 { |
| 112 section = WebInspector.panels.elements.sidebarPanes.metrics; | 112 section = WebInspector.inspectorView.panel("elements").sidebarPanes.
metrics; |
| 113 section.expand(); | 113 section.expand(); |
| 114 InspectorTest.runAfterPendingDispatches(next); | 114 InspectorTest.runAfterPendingDispatches(next); |
| 115 }, | 115 }, |
| 116 | 116 |
| 117 function testInitialContentBoxMetrics(next) | 117 function testInitialContentBoxMetrics(next) |
| 118 { | 118 { |
| 119 var spanElements = section.element.getElementsByClassName("content")
[0].getElementsByTagName("span"); | 119 var spanElements = section.element.getElementsByClassName("content")
[0].getElementsByTagName("span"); |
| 120 contentWidthElement = spanElements[0]; | 120 contentWidthElement = spanElements[0]; |
| 121 contentHeightElement = spanElements[1]; | 121 contentHeightElement = spanElements[1]; |
| 122 InspectorTest.addResult("=== Initial content-box ==="); | 122 InspectorTest.addResult("=== Initial content-box ==="); |
| (...skipping 24 matching lines...) Expand all Loading... |
| 147 <body onload="runTest()"> | 147 <body onload="runTest()"> |
| 148 <p> | 148 <p> |
| 149 Tests that content-box and border-box content area dimensions are handled proper
ty by the Metrics pane. | 149 Tests that content-box and border-box content area dimensions are handled proper
ty by the Metrics pane. |
| 150 </p> | 150 </p> |
| 151 <div id="content-box">content-box</div> | 151 <div id="content-box">content-box</div> |
| 152 <div id="border-box">border-box</div> | 152 <div id="border-box">border-box</div> |
| 153 <div id="output-content">zzz</div> | 153 <div id="output-content">zzz</div> |
| 154 <div id="output-border">zzz</div> | 154 <div id="output-border">zzz</div> |
| 155 </body> | 155 </body> |
| 156 </html> | 156 </html> |
| OLD | NEW |