| 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").className = "red"; | 9 document.getElementById("testElementOne").className = "red"; |
| 10 document.getElementById("testElementTwo").className = "red"; | 10 document.getElementById("testElementTwo").className = "red"; |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 var forceStyleRecalc2 = innerDocument.body.offsetTop; | 42 var forceStyleRecalc2 = innerDocument.body.offsetTop; |
| 43 elementOne.className = "snow"; | 43 elementOne.className = "snow"; |
| 44 elementTwo.className = "snow"; | 44 elementTwo.className = "snow"; |
| 45 elementThree.className = "snow"; | 45 elementThree.className = "snow"; |
| 46 var forceStyleRecalc3 = innerDocument.body.offsetTop; | 46 var forceStyleRecalc3 = innerDocument.body.offsetTop; |
| 47 return waitForFrame(); | 47 return waitForFrame(); |
| 48 } | 48 } |
| 49 | 49 |
| 50 function test() | 50 function test() |
| 51 { | 51 { |
| 52 var currentPanel = WebInspector.inspectorView.currentPanel(); | |
| 53 InspectorTest.assertEquals(currentPanel._panelName, "timeline", "Current pan
el should be the timeline."); | |
| 54 Runtime.experiments.enableForTest("timelineInvalidationTracking"); | 52 Runtime.experiments.enableForTest("timelineInvalidationTracking"); |
| 55 | 53 |
| 56 InspectorTest.runTestSuite([ | 54 InspectorTest.runTestSuite([ |
| 57 function testLocalFrame(next) | 55 function testLocalFrame(next) |
| 58 { | 56 { |
| 59 InspectorTest.invokeAsyncWithTimeline("changeStylesAndDisplay", func
tion() { | 57 InspectorTest.invokeAsyncWithTimeline("changeStylesAndDisplay", func
tion() { |
| 60 var record = InspectorTest.findFirstTimelineRecord(WebInspector.
TimelineModel.RecordType.UpdateLayoutTree); | 58 var record = InspectorTest.findFirstTimelineRecord(WebInspector.
TimelineModel.RecordType.UpdateLayoutTree); |
| 61 InspectorTest.addArray(record._event.invalidationTrackingEvents,
InspectorTest.InvalidationFormatters, "", "first recalculate styles"); | 59 InspectorTest.addArray(record._event.invalidationTrackingEvents,
InspectorTest.InvalidationFormatters, "", "first recalculate styles"); |
| 62 next(); | 60 next(); |
| 63 }); | 61 }); |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 107 </style> | 105 </style> |
| 108 </head> | 106 </head> |
| 109 <body onload="runTest()"> | 107 <body onload="runTest()"> |
| 110 <p>Tests the Timeline API instrumentation of style recalc events with invalidati
ons.</p> | 108 <p>Tests the Timeline API instrumentation of style recalc events with invalidati
ons.</p> |
| 111 <div class="testHolder"> | 109 <div class="testHolder"> |
| 112 <div id="testElementOne">PASS</div><div id="testElementTwo">PASS</div><div id="t
estElementThree">PASS</div> | 110 <div id="testElementOne">PASS</div><div id="testElementTwo">PASS</div><div id="t
estElementThree">PASS</div> |
| 113 </div> | 111 </div> |
| 114 <iframe src="../resources/timeline-iframe-with-style.html" style="position: abso
lute; left: 40px; top: 40px; width: 100px; height: 100px; border: none"></iframe
> | 112 <iframe src="../resources/timeline-iframe-with-style.html" style="position: abso
lute; left: 40px; top: 40px; width: 100px; height: 100px; border: none"></iframe
> |
| 115 </body> | 113 </body> |
| 116 </html> | 114 </html> |
| OLD | NEW |