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

Unified Diff: media/blink/multibuffer_data_source_unittest.cc

Issue 1941783004: Fix seeking after redirect (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2704
Patch Set: Created 4 years, 8 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
« no previous file with comments | « no previous file | media/blink/resource_multibuffer_data_provider.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/blink/multibuffer_data_source_unittest.cc
diff --git a/media/blink/multibuffer_data_source_unittest.cc b/media/blink/multibuffer_data_source_unittest.cc
index 816362a17ac42775d2c64285b929d6f7fec1f081..0a93d97d95771dd7bb5f4ab740d897e4a1705b8e 100644
--- a/media/blink/multibuffer_data_source_unittest.cc
+++ b/media/blink/multibuffer_data_source_unittest.cc
@@ -1317,4 +1317,26 @@ TEST_F(MultibufferDataSourceTest, Http_RetryThenRedirect) {
Stop();
}
+TEST_F(MultibufferDataSourceTest, Http_NotStreamingAfterRedirect) {
+ Initialize(kHttpUrl, true);
+
+ // Server responds with a redirect.
+ blink::WebURLRequest request((GURL(kHttpDifferentPathUrl)));
+ blink::WebURLResponse response((GURL(kHttpUrl)));
+ response.setHTTPStatusCode(307);
+ data_provider()->willFollowRedirect(url_loader(), request, response);
+
+ EXPECT_CALL(host_, SetTotalBytes(response_generator_->content_length()));
+ Respond(response_generator_->Generate206(0));
+
+ EXPECT_CALL(host_, AddBufferedByteRange(0, kDataSize));
+ ReceiveData(kDataSize);
+
+ EXPECT_FALSE(data_source_->IsStreaming());
+
+ FinishLoading();
+ EXPECT_FALSE(loading());
+ Stop();
+}
+
} // namespace media
« no previous file with comments | « no previous file | media/blink/resource_multibuffer_data_provider.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698