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 2ef2da8cfed486ac45f6800d48c1ca35c4a89f2b..158a5dd56e1241989ccb6b67abffd0095e189df0 100644 |
--- a/webkit/media/buffered_data_source_unittest.cc |
+++ b/webkit/media/buffered_data_source_unittest.cc |
@@ -17,7 +17,6 @@ |
using ::testing::_; |
using ::testing::Assign; |
using ::testing::Invoke; |
-using ::testing::Mock; |
using ::testing::StrictMock; |
using ::testing::NiceMock; |
@@ -55,14 +54,6 @@ class MockBufferedDataSource : public BufferedDataSource { |
ON_CALL(*url_loader, cancel()) |
.WillByDefault(Assign(&loading_, false)); |
- // TODO(scherkus): this is a real leak detected by http://crbug.com/100914 |
- // but the fix will have to wait for a more invasive follow up patch. |
- // |
- // If you're curious what the fix is, we no longer need the reference |
- // counting added to BufferedResourceLoader in r23274 since we started |
- // using WebURLLoader in r69429. |
- Mock::AllowLeak(url_loader); |
- |
loader->SetURLLoaderForTest(url_loader); |
return loader; |
} |
@@ -173,7 +164,7 @@ class BufferedDataSourceTest : public testing::Test { |
} |
NiceMock<MockWebURLLoader>* url_loader() { |
return static_cast<NiceMock<MockWebURLLoader>*>( |
- loader()->url_loader_.get()); |
+ loader()->active_loader_->loader_.get()); |
} |
media::Preload preload() { return data_source_->preload_; } |
@@ -385,6 +376,9 @@ TEST_F(BufferedDataSourceTest, SetBitrate) { |
// Verify loader changed but still has same bitrate. |
EXPECT_NE(old_loader, loader()); |
EXPECT_EQ(1234, loader_bitrate()); |
+ |
+ // During teardown we'll also report our final network status. |
+ EXPECT_CALL(host_, SetBufferedBytes(4000000)); |
Stop(); |
} |
@@ -404,6 +398,9 @@ TEST_F(BufferedDataSourceTest, SetPlaybackRate) { |
// Verify loader changed but still has same bitrate. |
EXPECT_NE(old_loader, loader()); |
+ |
+ // During teardown we'll also report our final network status. |
+ EXPECT_CALL(host_, SetBufferedBytes(4000000)); |
Stop(); |
} |