| 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.body.style.backgroundColor = "blue"; |
| 10 document.body.style.backgroundColor = "blue"; | 10 document.getElementById("testElement").style.width = "100px"; |
| 11 document.getElementById("testElement").style.width = "100px"; | 11 var forceLayout = document.body.offsetTop; |
| 12 var forceLayout = document.body.offsetTop; | 12 return waitForFrame(); |
| 13 if (window.testRunner) | |
| 14 testRunner.layoutAndPaintAsyncThen(callback); | |
| 15 }); | |
| 16 } | 13 } |
| 17 | 14 |
| 18 function updateSubframeAndDisplay(callback) | 15 function updateSubframeAndDisplay() |
| 19 { | 16 { |
| 20 requestAnimationFrame(function() { | 17 frames[0].document.body.children[0].style.width = "200px"; |
| 21 frames[0].document.body.children[0].style.width = "200px"; | 18 var forceLayout = frames[0].document.body.offsetTop; |
| 22 var forceLayout = frames[0].document.body.offsetTop; | 19 return waitForFrame(); |
| 23 if (window.testRunner) | |
| 24 testRunner.layoutAndPaintAsyncThen(callback); | |
| 25 }); | |
| 26 } | 20 } |
| 27 | 21 |
| 28 function test() | 22 function test() |
| 29 { | 23 { |
| 30 var currentPanel = WebInspector.inspectorView.currentPanel(); | 24 var currentPanel = WebInspector.inspectorView.currentPanel(); |
| 31 InspectorTest.assertEquals(currentPanel._panelName, "timeline", "Current pan
el should be the timeline."); | 25 InspectorTest.assertEquals(currentPanel._panelName, "timeline", "Current pan
el should be the timeline."); |
| 32 Runtime.experiments.enableForTest("timelineInvalidationTracking"); | 26 Runtime.experiments.enableForTest("timelineInvalidationTracking"); |
| 33 | 27 |
| 34 InspectorTest.runTestSuite([ | 28 InspectorTest.runTestSuite([ |
| 35 function testLocalFrame(next) | 29 function testLocalFrame(next) |
| (...skipping 24 matching lines...) Expand all Loading... |
| 60 ]); | 54 ]); |
| 61 } | 55 } |
| 62 </script> | 56 </script> |
| 63 </head> | 57 </head> |
| 64 <body onload="runTest()"> | 58 <body onload="runTest()"> |
| 65 <p>Tests the Timeline API instrumentation of paint events with layout invalidati
ons.</p> | 59 <p>Tests the Timeline API instrumentation of paint events with layout invalidati
ons.</p> |
| 66 <div id="testElement">PASS</div> | 60 <div id="testElement">PASS</div> |
| 67 <iframe src="../resources/timeline-iframe-paint.html" style="position: absolute;
left: 40px; top: 40px; width: 100px; height: 100px; border: none"></iframe> | 61 <iframe src="../resources/timeline-iframe-paint.html" style="position: absolute;
left: 40px; top: 40px; width: 100px; height: 100px; border: none"></iframe> |
| 68 </body> | 62 </body> |
| 69 </html> | 63 </html> |
| OLD | NEW |