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

Unified Diff: webkit/media/buffered_data_source_unittest.cc

Issue 8399023: Fire canplaythrough event at the proper time for audio/video (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . 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
« no previous file with comments | « webkit/media/buffered_data_source.cc ('k') | webkit/media/webmediaplayer_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 f7f71315c21f2cc51602f81cde7468b89f513b7d..b7dcb90eafb8ff87ec16eed0920cce206e08f6e8 100644
--- a/webkit/media/buffered_data_source_unittest.cc
+++ b/webkit/media/buffered_data_source_unittest.cc
@@ -192,16 +192,17 @@ class BufferedDataSourceTest : public testing::Test {
// Expected loaded or not.
EXPECT_CALL(host_, SetLoaded(loaded));
- // TODO(hclam): The condition for streaming needs to be adjusted.
- if (instance_size != -1 && (loaded || partial_response)) {
+ if (instance_size != -1) {
EXPECT_CALL(host_, SetTotalBytes(instance_size));
if (loaded)
EXPECT_CALL(host_, SetBufferedBytes(instance_size));
else
EXPECT_CALL(host_, SetBufferedBytes(0));
- } else {
- EXPECT_CALL(host_, SetStreaming(true));
}
+
+ if (!partial_response || instance_size == -1)
+ EXPECT_CALL(host_, SetStreaming(true));
+
} else {
expected_init_status = media::PIPELINE_ERROR_NETWORK;
EXPECT_CALL(*loader_, Stop());
« no previous file with comments | « webkit/media/buffered_data_source.cc ('k') | webkit/media/webmediaplayer_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698