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

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

Issue 2316573002: PlzNavigate: Support ResourceTiming API (Closed)
Patch Set: Rebase 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "media/blink/resource_multibuffer_data_provider.h" 5 #include "media/blink/resource_multibuffer_data_provider.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 #include <algorithm> 8 #include <algorithm>
9 #include <string> 9 #include <string>
10 #include <utility> 10 #include <utility>
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 179
180 void Redirect(const char* url) { 180 void Redirect(const char* url) {
181 GURL redirectUrl(url); 181 GURL redirectUrl(url);
182 blink::WebURLRequest newRequest(redirectUrl); 182 blink::WebURLRequest newRequest(redirectUrl);
183 blink::WebURLResponse redirectResponse(gurl_); 183 blink::WebURLResponse redirectResponse(gurl_);
184 184
185 EXPECT_CALL(*this, RedirectCallback(_)) 185 EXPECT_CALL(*this, RedirectCallback(_))
186 .WillOnce( 186 .WillOnce(
187 Invoke(this, &ResourceMultiBufferDataProviderTest::SetUrlData)); 187 Invoke(this, &ResourceMultiBufferDataProviderTest::SetUrlData));
188 188
189 loader_->willFollowRedirect(url_loader_, newRequest, redirectResponse, 0); 189 loader_->willFollowRedirect(url_loader_, newRequest, redirectResponse);
190 190
191 base::RunLoop().RunUntilIdle(); 191 base::RunLoop().RunUntilIdle();
192 } 192 }
193 193
194 void StopWhenLoad() { 194 void StopWhenLoad() {
195 InSequence s; 195 InSequence s;
196 EXPECT_CALL(*url_loader_, cancel()); 196 EXPECT_CALL(*url_loader_, cancel());
197 loader_ = nullptr; 197 loader_ = nullptr;
198 url_data_ = nullptr; 198 url_data_ = nullptr;
199 } 199 }
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
329 TEST_F(ResourceMultiBufferDataProviderTest, TestRedirects) { 329 TEST_F(ResourceMultiBufferDataProviderTest, TestRedirects) {
330 // Test redirect. 330 // Test redirect.
331 Initialize(kHttpUrl, 0); 331 Initialize(kHttpUrl, 0);
332 Start(); 332 Start();
333 Redirect(kHttpRedirect); 333 Redirect(kHttpRedirect);
334 FullResponse(1024); 334 FullResponse(1024);
335 StopWhenLoad(); 335 StopWhenLoad();
336 } 336 }
337 337
338 } // namespace media 338 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698