| 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 <script> | 5 <script> |
| 6 | 6 |
| 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 return waitForFrame(); |
| 11 if (window.testRunner) | |
| 12 testRunner.layoutAndPaintAsyncThen(callback); | |
| 13 }); | |
| 14 } | 11 } |
| 15 | 12 |
| 16 function updateSubframeAndDisplay(callback) | 13 function updateSubframeAndDisplay() |
| 17 { | 14 { |
| 18 requestAnimationFrame(function() { | 15 frames[0].document.body.children[0].style.backgroundColor = "green"; |
| 19 frames[0].document.body.children[0].style.backgroundColor = "green"; | 16 return waitForFrame(); |
| 20 if (window.testRunner) | |
| 21 testRunner.layoutAndPaintAsyncThen(callback); | |
| 22 }); | |
| 23 } | 17 } |
| 24 | 18 |
| 25 function test() | 19 function test() |
| 26 { | 20 { |
| 27 InspectorTest.invokeAsyncWithTimeline("display", step1); | 21 InspectorTest.invokeAsyncWithTimeline("display", step1); |
| 28 | 22 |
| 29 function step1(records) | 23 function step1(records) |
| 30 { | 24 { |
| 31 var record = InspectorTest.findFirstTimelineRecord(WebInspector.Timeline
Model.RecordType.Paint); | 25 var record = InspectorTest.findFirstTimelineRecord(WebInspector.Timeline
Model.RecordType.Paint); |
| 32 if (record) | 26 if (record) |
| (...skipping 28 matching lines...) Expand all Loading... |
| 61 </script> | 55 </script> |
| 62 </head> | 56 </head> |
| 63 | 57 |
| 64 <body onload="runTest()"> | 58 <body onload="runTest()"> |
| 65 <p> | 59 <p> |
| 66 Tests the Timeline API instrumentation of a paint event | 60 Tests the Timeline API instrumentation of a paint event |
| 67 </p> | 61 </p> |
| 68 <iframe src="../resources/timeline-iframe-paint.html" style="position: absolute;
left: 40px; top: 40px; width: 100px; height: 100px; border: none"></iframe> | 62 <iframe src="../resources/timeline-iframe-paint.html" style="position: absolute;
left: 40px; top: 40px; width: 100px; height: 100px; border: none"></iframe> |
| 69 </body> | 63 </body> |
| 70 </html> | 64 </html> |
| OLD | NEW |