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