Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(52)

Unified Diff: third_party/WebKit/LayoutTests/inspector/tracing/timeline-paint/timeline-paint.html

Issue 2208963002: [DevTools] Removed InspectorTest.invokeFunctionInPageAsync (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@remove-promise-from-other-tests
Patch Set: Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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()

Powered by Google App Engine
This is Rietveld 408576698