| Index: third_party/WebKit/LayoutTests/http/tests/inspector/tracing/timeline-xhr-event.html
|
| diff --git a/third_party/WebKit/LayoutTests/http/tests/inspector/tracing/timeline-xhr-event.html b/third_party/WebKit/LayoutTests/http/tests/inspector/tracing/timeline-xhr-event.html
|
| index 8e5677962b876960bf0ef5013e95695f366d5165..bda38ccbc6a85a5933bf88ce6743133510128cff 100644
|
| --- a/third_party/WebKit/LayoutTests/http/tests/inspector/tracing/timeline-xhr-event.html
|
| +++ b/third_party/WebKit/LayoutTests/http/tests/inspector/tracing/timeline-xhr-event.html
|
| @@ -5,13 +5,16 @@
|
| <script src="../network-test.js"></script>
|
| <script>
|
|
|
| -function performActions(callback)
|
| +function performActions()
|
| {
|
| + var callback;
|
| + var promise = new Promise((fulfill) => callback = fulfill);
|
| var xhr = new XMLHttpRequest();
|
| xhr.open("GET", "network/resources/resource.php", true);
|
| xhr.onload = callback; // This is necessary for XHRLoad event.
|
| xhr.onreadystatechange = function () { }; // This is necessary for XHRReadyStateChange event.
|
| xhr.send(null);
|
| + return promise;
|
| }
|
|
|
| function test()
|
|
|