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

Side by Side Diff: third_party/WebKit/LayoutTests/inspector/tracing/timeline-paint/timeline-paint-with-layout-invalidations-on-deleted-node.html

Issue 2208963002: [DevTools] Removed InspectorTest.invokeFunctionInPageAsync (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@remove-promise-from-other-tests
Patch Set: 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 display(callback) 7 function display()
8 { 8 {
9 var callback;
10 var promise = new Promise((fulfill) => callback = fulfill);
caseq 2016/08/05 17:56:42 Let's rewrite this and a few following ones to jus
kozy 2016/08/10 01:21:14 Done.
9 requestAnimationFrame(function() { 11 requestAnimationFrame(function() {
10 document.body.style.backgroundColor = "blue"; 12 document.body.style.backgroundColor = "blue";
11 var element = document.getElementById("testElement"); 13 var element = document.getElementById("testElement");
12 element.style.width = "100px"; 14 element.style.width = "100px";
13 var forceLayout = document.body.offsetTop; 15 var forceLayout = document.body.offsetTop;
14 element.parentElement.removeChild(element); 16 element.parentElement.removeChild(element);
15 if (window.testRunner) 17 if (window.testRunner)
16 testRunner.layoutAndPaintAsyncThen(callback); 18 testRunner.layoutAndPaintAsyncThen(callback);
17 }); 19 });
20 return promise;
18 } 21 }
19 22
20 function updateSubframeAndDisplay(callback) 23 function updateSubframeAndDisplay()
21 { 24 {
25 var callback;
26 var promise = new Promise((fulfill) => callback = fulfill);
22 requestAnimationFrame(function() { 27 requestAnimationFrame(function() {
23 var element = frames[0].document.body.children[0]; 28 var element = frames[0].document.body.children[0];
24 element.style.width = "200px"; 29 element.style.width = "200px";
25 var forceLayout = frames[0].document.body.offsetTop; 30 var forceLayout = frames[0].document.body.offsetTop;
26 element.parentElement.removeChild(element); 31 element.parentElement.removeChild(element);
27 if (window.testRunner) 32 if (window.testRunner)
28 testRunner.layoutAndPaintAsyncThen(callback); 33 testRunner.layoutAndPaintAsyncThen(callback);
29 }); 34 });
35 return promise;
30 } 36 }
31 37
32 function test() 38 function test()
33 { 39 {
34 var currentPanel = WebInspector.inspectorView.currentPanel(); 40 var currentPanel = WebInspector.inspectorView.currentPanel();
35 InspectorTest.assertEquals(currentPanel._panelName, "timeline", "Current pan el should be the timeline."); 41 InspectorTest.assertEquals(currentPanel._panelName, "timeline", "Current pan el should be the timeline.");
36 Runtime.experiments.enableForTest("timelineInvalidationTracking"); 42 Runtime.experiments.enableForTest("timelineInvalidationTracking");
37 43
38 InspectorTest.runTestSuite([ 44 InspectorTest.runTestSuite([
39 function testLocalFrame(next) 45 function testLocalFrame(next)
(...skipping 24 matching lines...) Expand all
64 ]); 70 ]);
65 } 71 }
66 </script> 72 </script>
67 </head> 73 </head>
68 <body onload="runTest()"> 74 <body onload="runTest()">
69 <p>Tests the Timeline API instrumentation of layout invalidations on a deleted n ode.</p> 75 <p>Tests the Timeline API instrumentation of layout invalidations on a deleted n ode.</p>
70 <div id="testElement">FAIL - this should not be present when the test finishes.< /div> 76 <div id="testElement">FAIL - this should not be present when the test finishes.< /div>
71 <iframe src="../resources/timeline-iframe-paint.html" style="position: absolute; left: 40px; top: 40px; width: 100px; height: 100px; border: none"></iframe> 77 <iframe src="../resources/timeline-iframe-paint.html" style="position: absolute; left: 40px; top: 40px; width: 100px; height: 100px; border: none"></iframe>
72 </body> 78 </body>
73 </html> 79 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698