Chromium Code Reviews| Index: third_party/WebKit/LayoutTests/inspector/tracing/timeline-paint/timeline-paint.html |
| diff --git a/third_party/WebKit/LayoutTests/inspector/tracing/timeline-paint/timeline-paint.html b/third_party/WebKit/LayoutTests/inspector/tracing/timeline-paint/timeline-paint.html |
| index a49206ce66687a2738aaf206b83ff80f174f6a8b..fecea1623f2cf56e2e8be1d37107fe61bfefd413 100644 |
| --- a/third_party/WebKit/LayoutTests/inspector/tracing/timeline-paint/timeline-paint.html |
| +++ b/third_party/WebKit/LayoutTests/inspector/tracing/timeline-paint/timeline-paint.html |
| @@ -4,22 +4,28 @@ |
| <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() instead?
kozy
2016/08/11 01:34:17
Done.
|
| document.body.style.backgroundColor = "blue"; |
| if (window.testRunner) |
| testRunner.layoutAndPaintAsyncThen(callback); |
| }); |
| + return promise; |
| } |
| -function updateSubframeAndDisplay(callback) |
| +function updateSubframeAndDisplay() |
| { |
| + var callback; |
| + var promise = new Promise((fulfill) => callback = fulfill); |
| requestAnimationFrame(function() { |
|
caseq
2016/08/10 22:44:55
ditto.
kozy
2016/08/11 01:34:17
Done.
|
| frames[0].document.body.children[0].style.backgroundColor = "green"; |
| if (window.testRunner) |
| testRunner.layoutAndPaintAsyncThen(callback); |
| }); |
| + return promise; |
| } |
| function test() |