| 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 22 matching lines...) Expand all Loading... |
| 33 function changeSubframeStylesAndDisplay() | 33 function changeSubframeStylesAndDisplay() |
| 34 { | 34 { |
| 35 frames[0].document.body.style.backgroundColor = "papayawhip"; | 35 frames[0].document.body.style.backgroundColor = "papayawhip"; |
| 36 frames[0].document.body.children[0].style.width = "200px"; | 36 frames[0].document.body.children[0].style.width = "200px"; |
| 37 var forceLayout = frames[0].document.body.offsetTop; | 37 var forceLayout = frames[0].document.body.offsetTop; |
| 38 return waitForFrame(); | 38 return waitForFrame(); |
| 39 } | 39 } |
| 40 | 40 |
| 41 function test() | 41 function test() |
| 42 { | 42 { |
| 43 var currentPanel = WebInspector.inspectorView.currentPanel(); | |
| 44 InspectorTest.assertEquals(currentPanel._panelName, "timeline", "Current pan
el should be the timeline."); | |
| 45 Runtime.experiments.enableForTest("timelineInvalidationTracking"); | 43 Runtime.experiments.enableForTest("timelineInvalidationTracking"); |
| 46 | 44 |
| 47 InspectorTest.runTestSuite([ | 45 InspectorTest.runTestSuite([ |
| 48 function testLocalFrame(next) | 46 function testLocalFrame(next) |
| 49 { | 47 { |
| 50 InspectorTest.invokeAsyncWithTimeline("changeStylesAndDisplay", func
tion() { | 48 InspectorTest.invokeAsyncWithTimeline("changeStylesAndDisplay", func
tion() { |
| 51 var record = InspectorTest.findFirstTimelineRecord(WebInspector.
TimelineModel.RecordType.UpdateLayoutTree); | 49 var record = InspectorTest.findFirstTimelineRecord(WebInspector.
TimelineModel.RecordType.UpdateLayoutTree); |
| 52 InspectorTest.addArray(record._event.invalidationTrackingEvents,
InspectorTest.InvalidationFormatters, "", "first recalc style invalidations"); | 50 InspectorTest.addArray(record._event.invalidationTrackingEvents,
InspectorTest.InvalidationFormatters, "", "first recalc style invalidations"); |
| 53 | 51 |
| 54 next(); | 52 next(); |
| (...skipping 28 matching lines...) Expand all Loading... |
| 83 ]); | 81 ]); |
| 84 } | 82 } |
| 85 </script> | 83 </script> |
| 86 </head> | 84 </head> |
| 87 <body onload="runTest()"> | 85 <body onload="runTest()"> |
| 88 <p>Tests the Timeline API instrumentation of style recalc events with invalidati
ons.</p> | 86 <p>Tests the Timeline API instrumentation of style recalc events with invalidati
ons.</p> |
| 89 <div id="testElementOne">PASS</div><div id="testElementTwo">PASS</div><div id="t
estElementThree">PASS</div> | 87 <div id="testElementOne">PASS</div><div id="testElementTwo">PASS</div><div id="t
estElementThree">PASS</div> |
| 90 <iframe src="../resources/timeline-iframe-paint.html" style="position: absolute;
left: 40px; top: 40px; width: 100px; height: 100px; border: none"></iframe> | 88 <iframe src="../resources/timeline-iframe-paint.html" style="position: absolute;
left: 40px; top: 40px; width: 100px; height: 100px; border: none"></iframe> |
| 91 </body> | 89 </body> |
| 92 </html> | 90 </html> |
| OLD | NEW |