Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(213)

Side by Side Diff: third_party/WebKit/LayoutTests/inspector/tracing/timeline-paint/timeline-paint-and-multiple-style-invalidations.html

Issue 2208963002: [DevTools] Removed InspectorTest.invokeFunctionInPageAsync (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@remove-promise-from-other-tests
Patch Set: a Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 multipleStyleRecalcsAndDisplay(callback) 7 function multipleStyleRecalcsAndDisplay()
8 { 8 {
9 requestAnimationFrame(function() { 9 document.getElementById("testElementOne").className = "red";
10 document.getElementById("testElementOne").className = "red"; 10 var forceStyleRecalc1 = document.body.offsetTop;
11 var forceStyleRecalc1 = document.body.offsetTop; 11 document.getElementById("testElementOne").className = "snow";
12 document.getElementById("testElementOne").className = "snow"; 12 var forceStyleRecalc2 = document.body.offsetTop;
13 var forceStyleRecalc2 = document.body.offsetTop; 13 return waitForFrame();
14 if (window.testRunner)
15 testRunner.layoutAndPaintAsyncThen(callback);
16 });
17 } 14 }
18 15
19 16
20 function test() 17 function test()
21 { 18 {
22 var currentPanel = WebInspector.inspectorView.currentPanel(); 19 var currentPanel = WebInspector.inspectorView.currentPanel();
23 InspectorTest.assertEquals(currentPanel._panelName, "timeline", "Current pan el should be the timeline."); 20 InspectorTest.assertEquals(currentPanel._panelName, "timeline", "Current pan el should be the timeline.");
24 Runtime.experiments.enableForTest("timelineInvalidationTracking"); 21 Runtime.experiments.enableForTest("timelineInvalidationTracking");
25 InspectorTest.invokeAsyncWithTimeline("multipleStyleRecalcsAndDisplay", test MultipleStyleRecalcs); 22 InspectorTest.invokeAsyncWithTimeline("multipleStyleRecalcsAndDisplay", test MultipleStyleRecalcs);
26 23
(...skipping 25 matching lines...) Expand all
52 .testHolder > .snow .dummy { } 49 .testHolder > .snow .dummy { }
53 </style> 50 </style>
54 </head> 51 </head>
55 <body onload="runTest()"> 52 <body onload="runTest()">
56 <p>Tests the Timeline API instrumentation of multiple style recalc invalidations and ensures they are all collected on the paint event.</p> 53 <p>Tests the Timeline API instrumentation of multiple style recalc invalidations and ensures they are all collected on the paint event.</p>
57 <div class="testHolder"> 54 <div class="testHolder">
58 <div id="testElementOne">PASS</div><div id="testElementTwo">PASS</div><div id="t estElementThree">PASS</div> 55 <div id="testElementOne">PASS</div><div id="testElementTwo">PASS</div><div id="t estElementThree">PASS</div>
59 </div> 56 </div>
60 </body> 57 </body>
61 </html> 58 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698