| 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.getElementById("testElement").style.width = "100px"; | 9 document.getElementById("testElement").style.width = "100px"; |
| 10 var forceLayout1 = document.body.offsetTop; | 10 var forceLayout1 = document.body.offsetTop; |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 } | 23 } |
| 24 | 24 |
| 25 function test() | 25 function test() |
| 26 { | 26 { |
| 27 Runtime.experiments.enableForTest("timelineInvalidationTracking"); | 27 Runtime.experiments.enableForTest("timelineInvalidationTracking"); |
| 28 | 28 |
| 29 InspectorTest.runTestSuite([ | 29 InspectorTest.runTestSuite([ |
| 30 function testLocalFrame(next) | 30 function testLocalFrame(next) |
| 31 { | 31 { |
| 32 InspectorTest.invokeAsyncWithTimeline("display", function() { | 32 InspectorTest.invokeAsyncWithTimeline("display", function() { |
| 33 var firstLayoutRecord = InspectorTest.findFirstTimelineRecord(We
bInspector.TimelineModel.RecordType.Layout); | 33 InspectorTest.dumpInvalidations(WebInspector.TimelineModel.Recor
dType.Layout, 0, "first layout invalidations"); |
| 34 InspectorTest.addArray(firstLayoutRecord._event.invalidationTrac
kingEvents, InspectorTest.InvalidationFormatters, "", "first layout invalidation
s"); | 34 InspectorTest.dumpInvalidations(WebInspector.TimelineModel.Recor
dType.Layout, 1, "second layout invalidations"); |
| 35 | |
| 36 var secondLayoutRecord = InspectorTest.findTimelineRecord(WebIns
pector.TimelineModel.RecordType.Layout, 1); | |
| 37 InspectorTest.addArray(secondLayoutRecord._event.invalidationTra
ckingEvents, InspectorTest.InvalidationFormatters, "", "second layout invalidati
ons"); | |
| 38 | |
| 39 next(); | 35 next(); |
| 40 }); | 36 }); |
| 41 }, | 37 }, |
| 42 | 38 |
| 43 function testSubframe(next) | 39 function testSubframe(next) |
| 44 { | 40 { |
| 45 InspectorTest.invokeAsyncWithTimeline("updateSubframeAndDisplay", fu
nction() { | 41 InspectorTest.invokeAsyncWithTimeline("updateSubframeAndDisplay", fu
nction() { |
| 46 var firstLayoutRecord = InspectorTest.findFirstTimelineRecord(We
bInspector.TimelineModel.RecordType.Layout); | 42 InspectorTest.dumpInvalidations(WebInspector.TimelineModel.Recor
dType.Layout, 0, "first layout invalidations"); |
| 47 InspectorTest.addArray(firstLayoutRecord._event.invalidationTrac
kingEvents, InspectorTest.InvalidationFormatters, "", "first layout invalidation
s"); | 43 InspectorTest.dumpInvalidations(WebInspector.TimelineModel.Recor
dType.Layout, 1, "second layout invalidations"); |
| 48 | |
| 49 var secondLayoutRecord = InspectorTest.findTimelineRecord(WebIns
pector.TimelineModel.RecordType.Layout, 1); | |
| 50 InspectorTest.addArray(secondLayoutRecord._event.invalidationTra
ckingEvents, InspectorTest.InvalidationFormatters, "", "second layout invalidati
ons"); | |
| 51 | |
| 52 next(); | 44 next(); |
| 53 }); | 45 }); |
| 54 } | 46 } |
| 55 ]); | 47 ]); |
| 56 } | 48 } |
| 57 </script> | 49 </script> |
| 58 </head> | 50 </head> |
| 59 <body onload="runTest()"> | 51 <body onload="runTest()"> |
| 60 <p>Tests the Timeline API instrumentation of layout events with invalidations.</
p> | 52 <p>Tests the Timeline API instrumentation of layout events with invalidations.</
p> |
| 61 <div id="outerTestElement" style="display: inline-block;"><div id="testElement">
PASS</div></div> | 53 <div id="outerTestElement" style="display: inline-block;"><div id="testElement">
PASS</div></div> |
| 62 <iframe src="../resources/timeline-iframe-paint.html" style="position: absolute;
left: 40px; top: 40px; width: 100px; height: 100px; border: none"></iframe> | 54 <iframe src="../resources/timeline-iframe-paint.html" style="position: absolute;
left: 40px; top: 40px; width: 100px; height: 100px; border: none"></iframe> |
| 63 </body> | 55 </body> |
| 64 </html> | 56 </html> |
| OLD | NEW |