| 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()
|
|
|