Chromium Code Reviews| Index: third_party/WebKit/LayoutTests/inspector/tracing/timeline-paint/timeline-paint-with-style-recalc-invalidations.html |
| diff --git a/third_party/WebKit/LayoutTests/inspector/tracing/timeline-paint/timeline-paint-with-style-recalc-invalidations.html b/third_party/WebKit/LayoutTests/inspector/tracing/timeline-paint/timeline-paint-with-style-recalc-invalidations.html |
| index 9cb631294088624a12279445c75e825fa754b676..7e209e5154b4f9d736795d3fb537d6371327f285 100644 |
| --- a/third_party/WebKit/LayoutTests/inspector/tracing/timeline-paint/timeline-paint-with-style-recalc-invalidations.html |
| +++ b/third_party/WebKit/LayoutTests/inspector/tracing/timeline-paint/timeline-paint-with-style-recalc-invalidations.html |
| @@ -4,23 +4,29 @@ |
| <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() { |
| document.body.style.backgroundColor = "blue"; |
| document.getElementById("testElement").style.backgroundColor = "salmon"; |
| if (window.testRunner) |
| testRunner.layoutAndPaintAsyncThen(callback); |
| }); |
| + return promise; |
|
caseq
2016/08/05 17:56:42
return generateFrames(1) instead.
kozy
2016/08/10 01:21:14
Done.
|
| } |
| -function updateSubframeAndDisplay(callback) |
| +function updateSubframeAndDisplay() |
| { |
| + var callback; |
| + var promise = new Promise((fulfill) => callback = fulfill); |
| requestAnimationFrame(function() { |
| frames[0].document.body.children[0].style.backgroundColor = "green"; |
| if (window.testRunner) |
| testRunner.layoutAndPaintAsyncThen(callback); |
| }); |
| + return promise; |
|
caseq
2016/08/05 17:56:42
ditto.
kozy
2016/08/10 01:21:14
Done.
|
| } |
| function test() |