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

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

Issue 2316573002: PlzNavigate: Support ResourceTiming API (Closed)
Patch Set: Nit + rebase + build fix Created 4 years, 2 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 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 delete_on_finish_(false), 132 delete_on_finish_(false),
133 delete_on_fail_(false), 133 delete_on_fail_(false),
134 did_receive_redirect_(false), 134 did_receive_redirect_(false),
135 did_receive_response_(false), 135 did_receive_response_(false),
136 check_redirect_request_priority_(false), 136 check_redirect_request_priority_(false),
137 did_finish_(false) {} 137 did_finish_(false) {}
138 138
139 ~TestWebURLLoaderClient() override {} 139 ~TestWebURLLoaderClient() override {}
140 140
141 // blink::WebURLLoaderClient implementation: 141 // blink::WebURLLoaderClient implementation:
142 void willFollowRedirect(blink::WebURLLoader* loader, 142 void willFollowRedirect(
143 blink::WebURLRequest& newRequest, 143 blink::WebURLLoader* loader,
144 const blink::WebURLResponse& redirectResponse, 144 blink::WebURLRequest& newRequest,
145 int64_t encodedDataLength) override { 145 const blink::WebURLResponse& redirectResponse) override {
146 EXPECT_TRUE(loader_); 146 EXPECT_TRUE(loader_);
147 EXPECT_EQ(loader_.get(), loader); 147 EXPECT_EQ(loader_.get(), loader);
148 148
149 if (check_redirect_request_priority_) 149 if (check_redirect_request_priority_)
150 EXPECT_EQ(redirect_request_priority, newRequest.getPriority()); 150 EXPECT_EQ(redirect_request_priority, newRequest.getPriority());
151 151
152 // No test currently simulates mutiple redirects. 152 // No test currently simulates mutiple redirects.
153 EXPECT_FALSE(did_receive_redirect_); 153 EXPECT_FALSE(did_receive_redirect_);
154 did_receive_redirect_ = true; 154 did_receive_redirect_ = true;
155 155
(...skipping 557 matching lines...) Expand 10 before | Expand all | Expand 10 after
713 encoded_data_length); 713 encoded_data_length);
714 714
715 EXPECT_EQ(kEncodedBodyLength, response.encodedBodyLength()); 715 EXPECT_EQ(kEncodedBodyLength, response.encodedBodyLength());
716 EXPECT_EQ(kEncodedDataLength, encoded_data_length); 716 EXPECT_EQ(kEncodedDataLength, encoded_data_length);
717 int expected_decoded_body_length = strlen(kBodyData); 717 int expected_decoded_body_length = strlen(kBodyData);
718 EXPECT_EQ(expected_decoded_body_length, response.decodedBodyLength()); 718 EXPECT_EQ(expected_decoded_body_length, response.decodedBodyLength());
719 } 719 }
720 720
721 } // namespace 721 } // namespace
722 } // namespace content 722 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698