Index: media/base/download_rate_monitor_unittest.cc |
diff --git a/media/base/download_rate_monitor_unittest.cc b/media/base/download_rate_monitor_unittest.cc |
index 787a5b4a96f471e6be4d0dcf80589f7defde004a..10068475827ab181720e5de908742b036d147dcb 100644 |
--- a/media/base/download_rate_monitor_unittest.cc |
+++ b/media/base/download_rate_monitor_unittest.cc |
@@ -120,16 +120,27 @@ TEST_F(DownloadRateMonitorTest, DownloadRateLessThanBitrate) { |
SimulateNetwork(1, 0, media_bitrate / 8 / 2, 1000, 10); |
} |
-TEST_F(DownloadRateMonitorTest, MediaIsLoaded) { |
+TEST_F(DownloadRateMonitorTest, MediaSourceIsLocal) { |
static const int media_bitrate = 1024 * 1024 * 8; |
- monitor_.set_loaded(true); |
+ monitor_.set_local_source(true); |
- // Simulate no data downloaded (source is already loaded). |
+ // Simulate no data downloaded. |
EXPECT_CALL(*this, CanPlayThrough()); |
monitor_.Start(base::Bind(&DownloadRateMonitorTest::CanPlayThrough, |
base::Unretained(this)), media_bitrate); |
- SimulateNetwork(1, 0, 0, 1000, 10); |
+} |
+ |
+TEST_F(DownloadRateMonitorTest, MediaSourceIsStreaming) { |
+ static const int media_bitrate = 1024 * 1024 * 8; |
+ |
+ monitor_.set_streaming(true); |
+ |
+ // Simulate downloading at the media's bitrate while streaming. |
+ EXPECT_CALL(*this, CanPlayThrough()); |
+ monitor_.Start(base::Bind(&DownloadRateMonitorTest::CanPlayThrough, |
+ base::Unretained(this)), media_bitrate); |
+ SimulateNetwork(1, 0, media_bitrate / 8, 1000, 10); |
} |
TEST_F(DownloadRateMonitorTest, VeryFastDownloadRate) { |