| 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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 } | 74 } |
| 75 | 75 |
| 76 InspectorTest.runTestSuite([ | 76 InspectorTest.runTestSuite([ |
| 77 function testBorderBoxInit1(next) | 77 function testBorderBoxInit1(next) |
| 78 { | 78 { |
| 79 InspectorTest.selectNodeAndWaitForStyles("border-box", next); | 79 InspectorTest.selectNodeAndWaitForStyles("border-box", next); |
| 80 }, | 80 }, |
| 81 | 81 |
| 82 function testBorderBoxInit2(next) | 82 function testBorderBoxInit2(next) |
| 83 { | 83 { |
| 84 section = WebInspector.panels.elements._metricsWidget; | 84 section = UI.panels.elements._metricsWidget; |
| 85 section.expand(); | 85 section.expand(); |
| 86 InspectorTest.addSniffer(section._updateController._updateThrottler,
"_processCompletedForTests", next); | 86 InspectorTest.addSniffer(section._updateController._updateThrottler,
"_processCompletedForTests", next); |
| 87 }, | 87 }, |
| 88 | 88 |
| 89 function testInitialBorderBoxMetrics(next) | 89 function testInitialBorderBoxMetrics(next) |
| 90 { | 90 { |
| 91 var spanElements = section.element.getElementsByClassName("content")
[0].getElementsByTagName("span"); | 91 var spanElements = section.element.getElementsByClassName("content")
[0].getElementsByTagName("span"); |
| 92 contentWidthElement = spanElements[0]; | 92 contentWidthElement = spanElements[0]; |
| 93 contentHeightElement = spanElements[1]; | 93 contentHeightElement = spanElements[1]; |
| 94 InspectorTest.addResult("=== Initial border-box ==="); | 94 InspectorTest.addResult("=== Initial border-box ==="); |
| (...skipping 11 matching lines...) Expand all Loading... |
| 106 next(); | 106 next(); |
| 107 }, | 107 }, |
| 108 | 108 |
| 109 function testContentBoxInit1(next) | 109 function testContentBoxInit1(next) |
| 110 { | 110 { |
| 111 InspectorTest.selectNodeWithId("content-box", next); | 111 InspectorTest.selectNodeWithId("content-box", next); |
| 112 }, | 112 }, |
| 113 | 113 |
| 114 function testContentBoxInit2(next) | 114 function testContentBoxInit2(next) |
| 115 { | 115 { |
| 116 section = WebInspector.panels.elements._metricsWidget; | 116 section = UI.panels.elements._metricsWidget; |
| 117 section.expand(); | 117 section.expand(); |
| 118 InspectorTest.addSniffer(section._updateController._updateThrottler,
"_processCompletedForTests", next); | 118 InspectorTest.addSniffer(section._updateController._updateThrottler,
"_processCompletedForTests", next); |
| 119 }, | 119 }, |
| 120 | 120 |
| 121 function testInitialContentBoxMetrics(next) | 121 function testInitialContentBoxMetrics(next) |
| 122 { | 122 { |
| 123 var spanElements = section.element.getElementsByClassName("content")
[0].getElementsByTagName("span"); | 123 var spanElements = section.element.getElementsByClassName("content")
[0].getElementsByTagName("span"); |
| 124 contentWidthElement = spanElements[0]; | 124 contentWidthElement = spanElements[0]; |
| 125 contentHeightElement = spanElements[1]; | 125 contentHeightElement = spanElements[1]; |
| 126 InspectorTest.addResult("=== Initial content-box ==="); | 126 InspectorTest.addResult("=== Initial content-box ==="); |
| (...skipping 24 matching lines...) Expand all Loading... |
| 151 <body onload="runTest()"> | 151 <body onload="runTest()"> |
| 152 <p> | 152 <p> |
| 153 Tests that content-box and border-box content area dimensions are handled proper
ty by the Metrics pane. | 153 Tests that content-box and border-box content area dimensions are handled proper
ty by the Metrics pane. |
| 154 </p> | 154 </p> |
| 155 <div id="content-box">content-box</div> | 155 <div id="content-box">content-box</div> |
| 156 <div id="border-box">border-box</div> | 156 <div id="border-box">border-box</div> |
| 157 <div id="output-content">zzz</div> | 157 <div id="output-content">zzz</div> |
| 158 <div id="output-border">zzz</div> | 158 <div id="output-border">zzz</div> |
| 159 </body> | 159 </body> |
| 160 </html> | 160 </html> |
| OLD | NEW |