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

Side by Side Diff: content/child/web_url_loader_impl_unittest.cc

Issue 2316573002: PlzNavigate: Support ResourceTiming API (Closed)
Patch Set: Addressed comments (clamy@) Created 4 years, 3 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/child/web_url_loader_impl.h" 5 #include "content/child/web_url_loader_impl.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 #include <string.h> 8 #include <string.h>
9 9
10 #include <utility> 10 #include <utility>
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 delete_on_finish_(false), 130 delete_on_finish_(false),
131 delete_on_fail_(false), 131 delete_on_fail_(false),
132 did_receive_redirect_(false), 132 did_receive_redirect_(false),
133 did_receive_response_(false), 133 did_receive_response_(false),
134 check_redirect_request_priority_(false), 134 check_redirect_request_priority_(false),
135 did_finish_(false) {} 135 did_finish_(false) {}
136 136
137 ~TestWebURLLoaderClient() override {} 137 ~TestWebURLLoaderClient() override {}
138 138
139 // blink::WebURLLoaderClient implementation: 139 // blink::WebURLLoaderClient implementation:
140 void willFollowRedirect(blink::WebURLLoader* loader, 140 void willFollowRedirect(
141 blink::WebURLRequest& newRequest, 141 blink::WebURLLoader* loader,
142 const blink::WebURLResponse& redirectResponse, 142 blink::WebURLRequest& newRequest,
143 int64_t encodedDataLength) override { 143 const blink::WebURLResponse& redirectResponse) override {
144 EXPECT_TRUE(loader_); 144 EXPECT_TRUE(loader_);
145 EXPECT_EQ(loader_.get(), loader); 145 EXPECT_EQ(loader_.get(), loader);
146 146
147 if (check_redirect_request_priority_) 147 if (check_redirect_request_priority_)
148 EXPECT_EQ(redirect_request_priority, newRequest.getPriority()); 148 EXPECT_EQ(redirect_request_priority, newRequest.getPriority());
149 149
150 // No test currently simulates mutiple redirects. 150 // No test currently simulates mutiple redirects.
151 EXPECT_FALSE(did_receive_redirect_); 151 EXPECT_FALSE(did_receive_redirect_);
152 did_receive_redirect_ = true; 152 did_receive_redirect_ = true;
153 153
(...skipping 569 matching lines...) Expand 10 before | Expand all | Expand 10 after
723 encoded_data_length); 723 encoded_data_length);
724 724
725 EXPECT_EQ(kEncodedBodyLength, response.encodedBodyLength()); 725 EXPECT_EQ(kEncodedBodyLength, response.encodedBodyLength());
726 EXPECT_EQ(kEncodedDataLength, encoded_data_length); 726 EXPECT_EQ(kEncodedDataLength, encoded_data_length);
727 int expected_decoded_body_length = strlen(kBodyData); 727 int expected_decoded_body_length = strlen(kBodyData);
728 EXPECT_EQ(expected_decoded_body_length, response.decodedBodyLength()); 728 EXPECT_EQ(expected_decoded_body_length, response.decodedBodyLength());
729 } 729 }
730 730
731 } // namespace 731 } // namespace
732 } // namespace content 732 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698