| OLD | NEW |
| 1 <!DOCTYPE HTML> | 1 <!DOCTYPE HTML> |
| 2 <html> | 2 <html> |
| 3 <head> | 3 <head> |
| 4 <script src="../../../http/tests/inspector/inspector-test.js"></script> | 4 <script src="../../../http/tests/inspector/inspector-test.js"></script> |
| 5 <script src="../../../http/tests/inspector/timeline-test.js"></script> | 5 <script src="../../../http/tests/inspector/timeline-test.js"></script> |
| 6 <script> | 6 <script> |
| 7 function display(callback) | 7 function display() |
| 8 { | 8 { |
| 9 requestAnimationFrame(function() { | 9 document.getElementById("testElement").style.width = "100px"; |
| 10 document.getElementById("testElement").style.width = "100px"; | 10 var forceLayout1 = document.body.offsetTop; |
| 11 var forceLayout1 = document.body.offsetTop; | 11 document.getElementById("testElement").style.width = "110px"; |
| 12 document.getElementById("testElement").style.width = "110px"; | 12 var forceLayout2 = document.body.offsetTop; |
| 13 var forceLayout2 = document.body.offsetTop; | 13 return waitForFrame(); |
| 14 if (window.testRunner) | |
| 15 testRunner.layoutAndPaintAsyncThen(callback); | |
| 16 }); | |
| 17 } | 14 } |
| 18 | 15 |
| 19 function updateSubframeAndDisplay(callback) | 16 function updateSubframeAndDisplay() |
| 20 { | 17 { |
| 21 requestAnimationFrame(function() { | 18 frames[0].document.body.children[0].style.width = "10px"; |
| 22 frames[0].document.body.children[0].style.width = "10px"; | 19 var forceLayout1 = frames[0].document.body.offsetTop; |
| 23 var forceLayout1 = frames[0].document.body.offsetTop; | 20 frames[0].document.body.children[0].style.width = "20px"; |
| 24 frames[0].document.body.children[0].style.width = "20px"; | 21 var forceLayout2 = frames[0].document.body.offsetTop; |
| 25 var forceLayout2 = frames[0].document.body.offsetTop; | 22 return waitForFrame(); |
| 26 if (window.testRunner) | |
| 27 testRunner.layoutAndPaintAsyncThen(callback); | |
| 28 }); | |
| 29 } | 23 } |
| 30 | 24 |
| 31 function test() | 25 function test() |
| 32 { | 26 { |
| 33 var currentPanel = WebInspector.inspectorView.currentPanel(); | 27 var currentPanel = WebInspector.inspectorView.currentPanel(); |
| 34 InspectorTest.assertEquals(currentPanel._panelName, "timeline", "Current pan
el should be the timeline."); | 28 InspectorTest.assertEquals(currentPanel._panelName, "timeline", "Current pan
el should be the timeline."); |
| 35 Runtime.experiments.enableForTest("timelineInvalidationTracking"); | 29 Runtime.experiments.enableForTest("timelineInvalidationTracking"); |
| 36 | 30 |
| 37 InspectorTest.runTestSuite([ | 31 InspectorTest.runTestSuite([ |
| 38 function testLocalFrame(next) | 32 function testLocalFrame(next) |
| (...skipping 24 matching lines...) Expand all Loading... |
| 63 ]); | 57 ]); |
| 64 } | 58 } |
| 65 </script> | 59 </script> |
| 66 </head> | 60 </head> |
| 67 <body onload="runTest()"> | 61 <body onload="runTest()"> |
| 68 <p>Tests the Timeline API instrumentation of layout events with invalidations.</
p> | 62 <p>Tests the Timeline API instrumentation of layout events with invalidations.</
p> |
| 69 <div id="outerTestElement" style="display: inline-block;"><div id="testElement">
PASS</div></div> | 63 <div id="outerTestElement" style="display: inline-block;"><div id="testElement">
PASS</div></div> |
| 70 <iframe src="../resources/timeline-iframe-paint.html" style="position: absolute;
left: 40px; top: 40px; width: 100px; height: 100px; border: none"></iframe> | 64 <iframe src="../resources/timeline-iframe-paint.html" style="position: absolute;
left: 40px; top: 40px; width: 100px; height: 100px; border: none"></iframe> |
| 71 </body> | 65 </body> |
| 72 </html> | 66 </html> |
| OLD | NEW |