| 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 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 ==="); |
| 95 dumpMetrics(section.element); | 95 dumpMetrics(section.element); |
| 96 contentWidthElement.dispatchEvent(createDoubleClickEvent()); | 96 contentWidthElement.dispatchEvent(createDoubleClickEvent()); |
| 97 contentWidthElement.textContent = "60"; | 97 contentWidthElement.textContent = "60"; |
| 98 contentWidthElement.dispatchEvent(InspectorTest.createKeyEvent("Ente
r")); | 98 contentWidthElement.dispatchEvent(InspectorTest.createKeyEvent("Ente
r")); |
| 99 InspectorTest.runAfterPendingDispatches(next); | 99 InspectorTest.deprecatedRunAfterPendingDispatches(next); |
| 100 }, | 100 }, |
| 101 | 101 |
| 102 function testModifiedBorderBoxMetrics(next) | 102 function testModifiedBorderBoxMetrics(next) |
| 103 { | 103 { |
| 104 InspectorTest.addResult("=== Modified border-box ==="); | 104 InspectorTest.addResult("=== Modified border-box ==="); |
| 105 dumpMetrics(section.element); | 105 dumpMetrics(section.element); |
| 106 next(); | 106 next(); |
| 107 }, | 107 }, |
| 108 | 108 |
| 109 function testContentBoxInit1(next) | 109 function testContentBoxInit1(next) |
| (...skipping 11 matching lines...) Expand all Loading... |
| 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 ==="); |
| 127 dumpMetrics(section.element); | 127 dumpMetrics(section.element); |
| 128 contentWidthElement.dispatchEvent(createDoubleClickEvent()); | 128 contentWidthElement.dispatchEvent(createDoubleClickEvent()); |
| 129 contentWidthElement.textContent = "60"; | 129 contentWidthElement.textContent = "60"; |
| 130 contentWidthElement.dispatchEvent(InspectorTest.createKeyEvent("Ente
r")); | 130 contentWidthElement.dispatchEvent(InspectorTest.createKeyEvent("Ente
r")); |
| 131 InspectorTest.runAfterPendingDispatches(next); | 131 InspectorTest.deprecatedRunAfterPendingDispatches(next); |
| 132 next(); | 132 next(); |
| 133 }, | 133 }, |
| 134 | 134 |
| 135 function testModifiedContentBoxMetrics(next) | 135 function testModifiedContentBoxMetrics(next) |
| 136 { | 136 { |
| 137 function callback() | 137 function callback() |
| 138 { | 138 { |
| 139 next(); | 139 next(); |
| 140 } | 140 } |
| 141 | 141 |
| 142 InspectorTest.addResult("=== Modified content-box ==="); | 142 InspectorTest.addResult("=== Modified content-box ==="); |
| 143 dumpMetrics(section.element); | 143 dumpMetrics(section.element); |
| 144 InspectorTest.evaluateInPage("dumpDimensions()", callback); | 144 InspectorTest.evaluateInPage("dumpDimensions()", callback); |
| 145 } | 145 } |
| 146 ]); | 146 ]); |
| 147 } | 147 } |
| 148 </script> | 148 </script> |
| 149 </head> | 149 </head> |
| 150 | 150 |
| 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 |