| OLD | NEW |
| 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 src="../../http/tests/inspector/timeline-test.js"></script> | 4 <script src="../../http/tests/inspector/timeline-test.js"></script> |
| 5 <style> | 5 <style> |
| 6 .relayout-boundary { | 6 .relayout-boundary { |
| 7 overflow: hidden; | 7 overflow: hidden; |
| 8 width: 100px; | 8 width: 100px; |
| 9 height: 100px; | 9 height: 100px; |
| 10 } | 10 } |
| 11 </style> | 11 </style> |
| 12 <script> | 12 <script> |
| 13 | 13 |
| 14 function invalidateAndForceLayout(element) | 14 function invalidateAndForceLayout(element) |
| 15 { | 15 { |
| 16 element.style.marginTop = "10px"; | 16 element.style.marginTop = "10px"; |
| 17 var unused = element.offsetHeight; | 17 var unused = element.offsetHeight; |
| 18 } | 18 } |
| 19 | 19 |
| 20 function performActions() | 20 function performActions() |
| 21 { | 21 { |
| 22 invalidateAndForceLayout(document.getElementById("invalidate1")); | 22 invalidateAndForceLayout(document.getElementById("invalidate1")); |
| 23 invalidateAndForceLayout(document.getElementById("invalidate2")); | 23 invalidateAndForceLayout(document.getElementById("invalidate2")); |
| 24 } | 24 } |
| 25 | 25 |
| 26 function test() | 26 function test() |
| 27 { | 27 { |
| 28 InspectorTest.evaluateInPage("testRunner.display()", function() { | 28 InspectorTest.performActionsAndPrint("performActions()", "Layout"); |
| 29 InspectorTest.performActionsAndPrint("performActions()", "Layout"); | |
| 30 }); | |
| 31 } | 29 } |
| 32 | 30 |
| 33 </script> | 31 </script> |
| 34 </head> | 32 </head> |
| 35 | 33 |
| 36 <body onload="runTest()"> | 34 <body onload="runTest()"> |
| 37 <p> | 35 <p> |
| 38 Tests the Timeline API instrumentation of a Layout event | 36 Tests the Timeline API instrumentation of a Layout event |
| 39 </p> | 37 </p> |
| 40 <div class="relayout-boundary"> | 38 <div class="relayout-boundary"> |
| 41 <div>text</div> | 39 <div>text</div> |
| 42 <div></div> | 40 <div></div> |
| 43 <div> | 41 <div> |
| 44 <div id="invalidate1"><div>text</div></div> | 42 <div id="invalidate1"><div>text</div></div> |
| 45 </div> | 43 </div> |
| 46 </div> | 44 </div> |
| 47 <div class="relayout-boundary"> | 45 <div class="relayout-boundary"> |
| 48 <div></div> | 46 <div></div> |
| 49 <div>text</div> | 47 <div>text</div> |
| 50 <div id="invalidate2"><div>text</div></div> | 48 <div id="invalidate2"><div>text</div></div> |
| 51 <div></div> | 49 <div></div> |
| 52 <div></div> | 50 <div></div> |
| 53 <div>text</div> | 51 <div>text</div> |
| 54 </div> | 52 </div> |
| 55 | 53 |
| 56 </body> | 54 </body> |
| 57 </html> | 55 </html> |
| OLD | NEW |