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

Unified Diff: third_party/WebKit/LayoutTests/inspector/tracing/timeline-network/timeline-network-resource-details.html

Issue 2208963002: [DevTools] Removed InspectorTest.invokeFunctionInPageAsync (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@remove-promise-from-other-tests
Patch Set: a 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-network/timeline-network-resource-details.html
diff --git a/third_party/WebKit/LayoutTests/inspector/tracing/timeline-network/timeline-network-resource-details.html b/third_party/WebKit/LayoutTests/inspector/tracing/timeline-network/timeline-network-resource-details.html
index 58da539fa762fcedb3a2fbc6e6a095551266ff42..9f075cf1f3cd5ce4969d2a8991e74e829daa69cc 100644
--- a/third_party/WebKit/LayoutTests/inspector/tracing/timeline-network/timeline-network-resource-details.html
+++ b/third_party/WebKit/LayoutTests/inspector/tracing/timeline-network/timeline-network-resource-details.html
@@ -4,23 +4,18 @@
<script src="../../../http/tests/inspector/timeline-test.js"></script>
<script>
-function performActions(callback)
+function performActions()
{
- function onRequestFinished()
- {
- if (!--requestsPending)
- callback();
- }
-
- var requestsPending = 2;
var image = new Image();
- image.onload = onRequestFinished;
+ var imagePromise = new Promise((fulfill) => image.onload = fulfill);
image.src = "../resources/anImage.png";
var script = document.createElement("script");
script.src = "timeline-network-resource.js";
document.body.appendChild(script);
- window.timelineNetworkResourceEvaluated = onRequestFinished;
+ var scriptPromise = new Promise((fulfill) => window.timelineNetworkResourceEvaluated = fulfill);
+
+ return Promise.all([imagePromise, scriptPromise]);
}
function test()

Powered by Google App Engine
This is Rietveld 408576698