| 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() {
|
| 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() {
|
| frames[0].document.body.children[0].style.backgroundColor = "green";
|
| if (window.testRunner)
|
| testRunner.layoutAndPaintAsyncThen(callback);
|
| });
|
| + return promise;
|
| }
|
|
|
| function test()
|
|
|