| 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 changeStylesAndDisplay() | 7 function changeStylesAndDisplay() |
| 8 { | 8 { |
| 9 document.getElementById("testElementOne").style.color = "red"; | 9 document.getElementById("testElementOne").style.color = "red"; |
| 10 document.getElementById("testElementTwo").style.color = "blue"; | 10 document.getElementById("testElementTwo").style.color = "blue"; |
| (...skipping 28 matching lines...) Expand all Loading... |
| 39 } | 39 } |
| 40 | 40 |
| 41 function test() | 41 function test() |
| 42 { | 42 { |
| 43 Runtime.experiments.enableForTest("timelineInvalidationTracking"); | 43 Runtime.experiments.enableForTest("timelineInvalidationTracking"); |
| 44 | 44 |
| 45 InspectorTest.runTestSuite([ | 45 InspectorTest.runTestSuite([ |
| 46 function testLocalFrame(next) | 46 function testLocalFrame(next) |
| 47 { | 47 { |
| 48 InspectorTest.invokeAsyncWithTimeline("changeStylesAndDisplay", func
tion() { | 48 InspectorTest.invokeAsyncWithTimeline("changeStylesAndDisplay", func
tion() { |
| 49 InspectorTest.dumpInvalidations(WebInspector.TimelineModel.Recor
dType.UpdateLayoutTree, 0, "first recalc style invalidations"); | 49 InspectorTest.dumpInvalidations(TimelineModel.TimelineModel.Reco
rdType.UpdateLayoutTree, 0, "first recalc style invalidations"); |
| 50 next(); | 50 next(); |
| 51 }); | 51 }); |
| 52 }, | 52 }, |
| 53 | 53 |
| 54 function multipleStyleRecalcs(next) | 54 function multipleStyleRecalcs(next) |
| 55 { | 55 { |
| 56 InspectorTest.invokeAsyncWithTimeline("changeMultipleStylesAndDispla
y", function() { | 56 InspectorTest.invokeAsyncWithTimeline("changeMultipleStylesAndDispla
y", function() { |
| 57 InspectorTest.dumpInvalidations(WebInspector.TimelineModel.Recor
dType.UpdateLayoutTree, 0, "first recalc style invalidations"); | 57 InspectorTest.dumpInvalidations(TimelineModel.TimelineModel.Reco
rdType.UpdateLayoutTree, 0, "first recalc style invalidations"); |
| 58 InspectorTest.dumpInvalidations(WebInspector.TimelineModel.Recor
dType.UpdateLayoutTree, 1, "second recalc style invalidations"); | 58 InspectorTest.dumpInvalidations(TimelineModel.TimelineModel.Reco
rdType.UpdateLayoutTree, 1, "second recalc style invalidations"); |
| 59 InspectorTest.dumpInvalidations(WebInspector.TimelineModel.Recor
dType.UpdateLayoutTree, 2, "third recalc style invalidations"); | 59 InspectorTest.dumpInvalidations(TimelineModel.TimelineModel.Reco
rdType.UpdateLayoutTree, 2, "third recalc style invalidations"); |
| 60 next(); | 60 next(); |
| 61 }); | 61 }); |
| 62 }, | 62 }, |
| 63 | 63 |
| 64 function testSubframe(next) | 64 function testSubframe(next) |
| 65 { | 65 { |
| 66 InspectorTest.invokeAsyncWithTimeline("changeSubframeStylesAndDispla
y", function() { | 66 InspectorTest.invokeAsyncWithTimeline("changeSubframeStylesAndDispla
y", function() { |
| 67 InspectorTest.dumpInvalidations(WebInspector.TimelineModel.Recor
dType.UpdateLayoutTree, 0, "first recalc style invalidations"); | 67 InspectorTest.dumpInvalidations(TimelineModel.TimelineModel.Reco
rdType.UpdateLayoutTree, 0, "first recalc style invalidations"); |
| 68 next(); | 68 next(); |
| 69 }); | 69 }); |
| 70 } | 70 } |
| 71 ]); | 71 ]); |
| 72 } | 72 } |
| 73 </script> | 73 </script> |
| 74 </head> | 74 </head> |
| 75 <body onload="runTest()"> | 75 <body onload="runTest()"> |
| 76 <p>Tests the Timeline API instrumentation of style recalc events with invalidati
ons.</p> | 76 <p>Tests the Timeline API instrumentation of style recalc events with invalidati
ons.</p> |
| 77 <div id="testElementOne">PASS</div><div id="testElementTwo">PASS</div><div id="t
estElementThree">PASS</div> | 77 <div id="testElementOne">PASS</div><div id="testElementTwo">PASS</div><div id="t
estElementThree">PASS</div> |
| 78 <iframe src="../resources/timeline-iframe-paint.html" style="position: absolute;
left: 40px; top: 40px; width: 100px; height: 100px; border: none"></iframe> | 78 <iframe src="../resources/timeline-iframe-paint.html" style="position: absolute;
left: 40px; top: 40px; width: 100px; height: 100px; border: none"></iframe> |
| 79 </body> | 79 </body> |
| 80 </html> | 80 </html> |
| OLD | NEW |