| 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"); |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 } | 24 } |
| 25 | 25 |
| 26 function test() | 26 function test() |
| 27 { | 27 { |
| 28 Runtime.experiments.enableForTest("timelineInvalidationTracking"); | 28 Runtime.experiments.enableForTest("timelineInvalidationTracking"); |
| 29 | 29 |
| 30 InspectorTest.runTestSuite([ | 30 InspectorTest.runTestSuite([ |
| 31 function testLocalFrame(next) | 31 function testLocalFrame(next) |
| 32 { | 32 { |
| 33 InspectorTest.invokeAsyncWithTimeline("display", function() { | 33 InspectorTest.invokeAsyncWithTimeline("display", function() { |
| 34 InspectorTest.dumpInvalidations(WebInspector.TimelineModel.Recor
dType.Paint, 0, "paint invalidations"); | 34 InspectorTest.dumpInvalidations(TimelineModel.TimelineModel.Reco
rdType.Paint, 0, "paint invalidations"); |
| 35 next(); | 35 next(); |
| 36 }); | 36 }); |
| 37 }, | 37 }, |
| 38 | 38 |
| 39 function testSubframe(next) | 39 function testSubframe(next) |
| 40 { | 40 { |
| 41 InspectorTest.invokeAsyncWithTimeline("updateSubframeAndDisplay", fu
nction() { | 41 InspectorTest.invokeAsyncWithTimeline("updateSubframeAndDisplay", fu
nction() { |
| 42 // The first paint corresponds to the local frame and should hav
e no invalidations. | 42 // The first paint corresponds to the local frame and should hav
e no invalidations. |
| 43 var firstPaintRecord = InspectorTest.findFirstTimelineRecord(Web
Inspector.TimelineModel.RecordType.Paint); | 43 var firstPaintRecord = InspectorTest.findFirstTimelineRecord(Tim
elineModel.TimelineModel.RecordType.Paint); |
| 44 var firstInvalidations = WebInspector.InvalidationTracker.invali
dationEventsFor(firstPaintRecord._event); | 44 var firstInvalidations = TimelineModel.InvalidationTracker.inval
idationEventsFor(firstPaintRecord._event); |
| 45 InspectorTest.assertEquals(firstInvalidations, null); | 45 InspectorTest.assertEquals(firstInvalidations, null); |
| 46 | 46 |
| 47 // The second paint corresponds to the subframe and should have
our layout/style invalidations. | 47 // The second paint corresponds to the subframe and should have
our layout/style invalidations. |
| 48 InspectorTest.dumpInvalidations(WebInspector.TimelineModel.Recor
dType.Paint, 1, "second paint invalidations"); | 48 InspectorTest.dumpInvalidations(TimelineModel.TimelineModel.Reco
rdType.Paint, 1, "second paint invalidations"); |
| 49 | 49 |
| 50 next(); | 50 next(); |
| 51 }); | 51 }); |
| 52 } | 52 } |
| 53 ]); | 53 ]); |
| 54 } | 54 } |
| 55 </script> | 55 </script> |
| 56 </head> | 56 </head> |
| 57 <body onload="runTest()"> | 57 <body onload="runTest()"> |
| 58 <p>Tests the Timeline API instrumentation of layout invalidations on a deleted n
ode.</p> | 58 <p>Tests the Timeline API instrumentation of layout invalidations on a deleted n
ode.</p> |
| 59 <div id="testElement">FAIL - this should not be present when the test finishes.<
/div> | 59 <div id="testElement">FAIL - this should not be present when the test finishes.<
/div> |
| 60 <iframe src="../resources/timeline-iframe-paint.html" style="position: absolute;
left: 40px; top: 40px; width: 100px; height: 100px; border: none"></iframe> | 60 <iframe src="../resources/timeline-iframe-paint.html" style="position: absolute;
left: 40px; top: 40px; width: 100px; height: 100px; border: none"></iframe> |
| 61 </body> | 61 </body> |
| 62 </html> | 62 </html> |
| OLD | NEW |