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

Unified Diff: webkit/media/buffered_data_source_unittest.cc

Issue 8661002: Fire CanPlayThrough immediately for local and streaming media files (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase ToT Created 9 years, 1 month 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
Index: webkit/media/buffered_data_source_unittest.cc
diff --git a/webkit/media/buffered_data_source_unittest.cc b/webkit/media/buffered_data_source_unittest.cc
index 2bcae64b681e0abf326634e46f125682ea2bac40..b32bf5c2afbae85228628f217de506c91fb61682 100644
--- a/webkit/media/buffered_data_source_unittest.cc
+++ b/webkit/media/buffered_data_source_unittest.cc
@@ -110,7 +110,6 @@ class BufferedDataSourceTest : public testing::Test {
void InitializeWith206Response() {
Initialize(media::PIPELINE_OK);
- EXPECT_CALL(host_, SetLoaded(false));
EXPECT_CALL(host_, SetTotalBytes(response_generator_.content_length()));
EXPECT_CALL(host_, SetBufferedBytes(0));
Respond(response_generator_.Generate206(0));
@@ -198,7 +197,6 @@ class BufferedDataSourceTest : public testing::Test {
TEST_F(BufferedDataSourceTest, Range_Supported) {
Initialize(media::PIPELINE_OK);
- EXPECT_CALL(host_, SetLoaded(false));
EXPECT_CALL(host_, SetTotalBytes(response_generator_.content_length()));
EXPECT_CALL(host_, SetBufferedBytes(0));
Respond(response_generator_.Generate206(0));
@@ -233,13 +231,12 @@ TEST_F(BufferedDataSourceTest, Range_NotSupported) {
Respond(response_generator_.Generate200());
// Now it'll succeed.
- EXPECT_CALL(host_, SetLoaded(false));
EXPECT_CALL(host_, SetTotalBytes(response_generator_.content_length()));
EXPECT_CALL(host_, SetBufferedBytes(0));
- EXPECT_CALL(host_, SetStreaming(true));
Respond(response_generator_.Generate200());
EXPECT_TRUE(data_source_->loading());
+ EXPECT_TRUE(data_source_->IsStreaming());
Stop();
}
@@ -265,7 +262,6 @@ TEST_F(BufferedDataSourceTest, Range_MissingContentLength) {
Initialize(media::PIPELINE_OK);
// It'll manage without a Content-Length response.
- EXPECT_CALL(host_, SetLoaded(false));
EXPECT_CALL(host_, SetTotalBytes(response_generator_.content_length()));
EXPECT_CALL(host_, SetBufferedBytes(0));
Respond(response_generator_.Generate206(

Powered by Google App Engine
This is Rietveld 408576698