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

Unified Diff: third_party/WebKit/LayoutTests/http/tests/inspector/network/network-xhr-replay.html

Issue 2914033002: [Devtools] NetworkLogView now uses NetworkLog as source of truth. (Closed)
Patch Set: Merge branch 'master' into MOVE_NETWORK_STUFF_AROUND Created 3 years, 6 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/http/tests/inspector/network/network-xhr-replay.html
diff --git a/third_party/WebKit/LayoutTests/http/tests/inspector/network/network-xhr-replay.html b/third_party/WebKit/LayoutTests/http/tests/inspector/network/network-xhr-replay.html
index c8f083e9c90828ac3d8f647947a4ef62631536a0..37c98c07b8bc52d42e9283cf430d5716dec58323 100644
--- a/third_party/WebKit/LayoutTests/http/tests/inspector/network/network-xhr-replay.html
+++ b/third_party/WebKit/LayoutTests/http/tests/inspector/network/network-xhr-replay.html
@@ -29,25 +29,19 @@ function test()
InspectorTest.assertEquals(request1.requestHeadersText, request2.requestHeadersText, "Requests have different requestHeadersText");
}
- function testXHRReplay(method, url, async, user, password, headers, withCredentials, payload, type, callback)
+ async function testXHRReplay(method, url, async, user, password, headers, withCredentials, payload, type, callback)
{
- InspectorTest.makeXHR(method, url, async, user, password, headers, withCredentials, payload, type, step2);
+ InspectorTest.makeXHR(method, url, async, user, password, headers, withCredentials, payload, type);
- var originalRequest;
- function step2()
- {
- originalRequest = lastRequest();
- dumpRequest(originalRequest);
- InspectorTest.NetworkAgent.replayXHR(originalRequest.requestId());
- InspectorTest.addSniffer(Network.NetworkLogView.prototype, "_appendRequest", step3);
- }
+ var originalRequest = await InspectorTest.waitForEvent(
+ NetworkLog.NetworkLog.Events.RequestAdded, NetworkLog.networkLog);
+ dumpRequest(originalRequest);
+ InspectorTest.NetworkAgent.replayXHR(originalRequest.requestId());
+ var replayedRequest = await InspectorTest.waitForEvent(
+ NetworkLog.NetworkLog.Events.RequestAdded, NetworkLog.networkLog);
- function step3()
- {
- var replayedRequest = lastRequest();
- assertRequestEqual(originalRequest, replayedRequest);
- callback();
- }
+ assertRequestEqual(originalRequest, replayedRequest);
+ callback();
}

Powered by Google App Engine
This is Rietveld 408576698