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

Side by Side Diff: media/blink/buffered_resource_loader_unittest.cc

Issue 2105713002: Render process changes for ResourceTiming sizes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@resource_timing_sizes_browser_process
Patch Set: Created 4 years, 5 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 <stdint.h> 5 #include <stdint.h>
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
195 195
196 // A valid partial response should always result in this being true. 196 // A valid partial response should always result in this being true.
197 EXPECT_TRUE(loader_->range_supported()); 197 EXPECT_TRUE(loader_->range_supported());
198 } 198 }
199 199
200 void Redirect(const char* url) { 200 void Redirect(const char* url) {
201 GURL redirectUrl(url); 201 GURL redirectUrl(url);
202 blink::WebURLRequest newRequest(redirectUrl); 202 blink::WebURLRequest newRequest(redirectUrl);
203 blink::WebURLResponse redirectResponse(gurl_); 203 blink::WebURLResponse redirectResponse(gurl_);
204 204
205 loader_->willFollowRedirect(url_loader_, newRequest, redirectResponse); 205 loader_->willFollowRedirect(url_loader_, newRequest, redirectResponse, 0);
206 206
207 base::RunLoop().RunUntilIdle(); 207 base::RunLoop().RunUntilIdle();
208 } 208 }
209 209
210 void StopWhenLoad() { 210 void StopWhenLoad() {
211 InSequence s; 211 InSequence s;
212 EXPECT_CALL(*url_loader_, cancel()); 212 EXPECT_CALL(*url_loader_, cancel());
213 loader_->Stop(); 213 loader_->Stop();
214 loader_.reset(); 214 loader_.reset();
215 } 215 }
(...skipping 948 matching lines...) Expand 10 before | Expand all | Expand 10 after
1164 1164
1165 // As soon as we have received enough data to fulfill the read, defer. 1165 // As soon as we have received enough data to fulfill the read, defer.
1166 EXPECT_CALL(*this, LoadingCallback(BufferedResourceLoader::kLoadingDeferred)); 1166 EXPECT_CALL(*this, LoadingCallback(BufferedResourceLoader::kLoadingDeferred));
1167 EXPECT_CALL(*this, ReadCallback(BufferedResourceLoader::kOk, 10)); 1167 EXPECT_CALL(*this, ReadCallback(BufferedResourceLoader::kOk, 10));
1168 WriteLoader(19, 1); 1168 WriteLoader(19, 1);
1169 VerifyBuffer(buffer, 10, 10); 1169 VerifyBuffer(buffer, 10, 10);
1170 EXPECT_FALSE(HasActiveLoader()); 1170 EXPECT_FALSE(HasActiveLoader());
1171 } 1171 }
1172 1172
1173 } // namespace media 1173 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698