Chromium Code Reviews| Index: third_party/WebKit/LayoutTests/inspector/tracing/timeline-paint/timeline-paint-with-layout-invalidations-on-deleted-node.html |
| diff --git a/third_party/WebKit/LayoutTests/inspector/tracing/timeline-paint/timeline-paint-with-layout-invalidations-on-deleted-node.html b/third_party/WebKit/LayoutTests/inspector/tracing/timeline-paint/timeline-paint-with-layout-invalidations-on-deleted-node.html |
| index 33eadbf38320a05b9e6c99213a02b43e96c3150b..fe4ea0b778b0303da6f1e84ea95eceb987c12b88 100644 |
| --- a/third_party/WebKit/LayoutTests/inspector/tracing/timeline-paint/timeline-paint-with-layout-invalidations-on-deleted-node.html |
| +++ b/third_party/WebKit/LayoutTests/inspector/tracing/timeline-paint/timeline-paint-with-layout-invalidations-on-deleted-node.html |
| @@ -4,8 +4,10 @@ |
| <script src="../../../http/tests/inspector/inspector-test.js"></script> |
| <script src="../../../http/tests/inspector/timeline-test.js"></script> |
| <script> |
| -function display(callback) |
| +function display() |
| { |
| + var callback; |
| + 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.
|
| requestAnimationFrame(function() { |
| document.body.style.backgroundColor = "blue"; |
| var element = document.getElementById("testElement"); |
| @@ -15,10 +17,13 @@ function display(callback) |
| if (window.testRunner) |
| testRunner.layoutAndPaintAsyncThen(callback); |
| }); |
| + return promise; |
| } |
| -function updateSubframeAndDisplay(callback) |
| +function updateSubframeAndDisplay() |
| { |
| + var callback; |
| + var promise = new Promise((fulfill) => callback = fulfill); |
| requestAnimationFrame(function() { |
| var element = frames[0].document.body.children[0]; |
| element.style.width = "200px"; |
| @@ -27,6 +32,7 @@ function updateSubframeAndDisplay(callback) |
| if (window.testRunner) |
| testRunner.layoutAndPaintAsyncThen(callback); |
| }); |
| + return promise; |
| } |
| function test() |