Chromium Code Reviews| Index: third_party/WebKit/LayoutTests/inspector/tracing/timeline-paint/timeline-paint-with-layout-invalidations.html |
| diff --git a/third_party/WebKit/LayoutTests/inspector/tracing/timeline-paint/timeline-paint-with-layout-invalidations.html b/third_party/WebKit/LayoutTests/inspector/tracing/timeline-paint/timeline-paint-with-layout-invalidations.html |
| index 32c5fb24b680463ace33291e2c7d879553bdab2e..5fc8cda3f23afaf870285fa6c5b061f19b1fc837 100644 |
| --- a/third_party/WebKit/LayoutTests/inspector/tracing/timeline-paint/timeline-paint-with-layout-invalidations.html |
| +++ b/third_party/WebKit/LayoutTests/inspector/tracing/timeline-paint/timeline-paint-with-layout-invalidations.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); |
| requestAnimationFrame(function() { |
|
caseq
2016/08/10 22:44:55
remove rAF() and use waitForFrame()?
kozy
2016/08/11 01:34:17
Done.
|
| document.body.style.backgroundColor = "blue"; |
| document.getElementById("testElement").style.width = "100px"; |
| @@ -13,16 +15,20 @@ 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() { |
| frames[0].document.body.children[0].style.width = "200px"; |
| var forceLayout = frames[0].document.body.offsetTop; |
| if (window.testRunner) |
| testRunner.layoutAndPaintAsyncThen(callback); |
| }); |
| + return promise; |
| } |
| function test() |