| 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() | 7 function display() |
| 8 { | 8 { |
| 9 document.body.style.backgroundColor = "blue"; | 9 document.body.style.backgroundColor = "blue"; |
| 10 var element = document.getElementById("testElement"); | 10 var element = document.getElementById("testElement"); |
| 11 element.style.width = "100px"; | 11 element.style.width = "100px"; |
| 12 var forceLayout = document.body.offsetTop; | 12 var forceLayout = document.body.offsetTop; |
| 13 element.parentElement.removeChild(element); | 13 element.parentElement.removeChild(element); |
| 14 return waitForFrame(); | 14 return waitForFrame(); |
| 15 } | 15 } |
| 16 | 16 |
| 17 function updateSubframeAndDisplay() | 17 function updateSubframeAndDisplay() |
| 18 { | 18 { |
| 19 var element = frames[0].document.body.children[0]; | 19 var element = frames[0].document.body.children[0]; |
| 20 element.style.width = "200px"; | 20 element.style.width = "200px"; |
| 21 var forceLayout = frames[0].document.body.offsetTop; | 21 var forceLayout = frames[0].document.body.offsetTop; |
| 22 element.parentElement.removeChild(element); | 22 element.parentElement.removeChild(element); |
| 23 return waitForFrame(); | 23 return waitForFrame(); |
| 24 } | 24 } |
| 25 | 25 |
| 26 function test() | 26 function test() |
| 27 { | 27 { |
| 28 var currentPanel = WebInspector.inspectorView.currentPanel(); | |
| 29 InspectorTest.assertEquals(currentPanel._panelName, "timeline", "Current pan
el should be the timeline."); | |
| 30 Runtime.experiments.enableForTest("timelineInvalidationTracking"); | 28 Runtime.experiments.enableForTest("timelineInvalidationTracking"); |
| 31 | 29 |
| 32 InspectorTest.runTestSuite([ | 30 InspectorTest.runTestSuite([ |
| 33 function testLocalFrame(next) | 31 function testLocalFrame(next) |
| 34 { | 32 { |
| 35 InspectorTest.invokeAsyncWithTimeline("display", function() { | 33 InspectorTest.invokeAsyncWithTimeline("display", function() { |
| 36 var record = InspectorTest.findFirstTimelineRecord(WebInspector.
TimelineModel.RecordType.Paint); | 34 var record = InspectorTest.findFirstTimelineRecord(WebInspector.
TimelineModel.RecordType.Paint); |
| 37 InspectorTest.addArray(record._event.invalidationTrackingEvents,
InspectorTest.InvalidationFormatters, "", "paint invalidations"); | 35 InspectorTest.addArray(record._event.invalidationTrackingEvents,
InspectorTest.InvalidationFormatters, "", "paint invalidations"); |
| 38 next(); | 36 next(); |
| 39 }); | 37 }); |
| (...skipping 17 matching lines...) Expand all Loading... |
| 57 ]); | 55 ]); |
| 58 } | 56 } |
| 59 </script> | 57 </script> |
| 60 </head> | 58 </head> |
| 61 <body onload="runTest()"> | 59 <body onload="runTest()"> |
| 62 <p>Tests the Timeline API instrumentation of layout invalidations on a deleted n
ode.</p> | 60 <p>Tests the Timeline API instrumentation of layout invalidations on a deleted n
ode.</p> |
| 63 <div id="testElement">FAIL - this should not be present when the test finishes.<
/div> | 61 <div id="testElement">FAIL - this should not be present when the test finishes.<
/div> |
| 64 <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> |
| 65 </body> | 63 </body> |
| 66 </html> | 64 </html> |
| OLD | NEW |