summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorvrk@google.com <vrk@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-07-07 22:40:43 +0000
committervrk@google.com <vrk@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-07-07 22:40:43 +0000
commit156c84585048ca444173b55097392e43c199a56c (patch)
tree7df35c8ec0b8d1cb8eee1efbdb8eaeabc15c75a0
parent71cf6aa188f65ef51073cb3482c7f2995f73cbe3 (diff)
downloadchromium_src-156c84585048ca444173b55097392e43c199a56c.zip
chromium_src-156c84585048ca444173b55097392e43c199a56c.tar.gz
chromium_src-156c84585048ca444173b55097392e43c199a56c.tar.bz2
Fixed memory leak in test shell tests
Added call to cleanup code in AllowDefer tests so that the resource is properly released. BUG=none TEST=test_shell_tests Review URL: http://codereview.chromium.org/2825042 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@51789 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--webkit/glue/media/buffered_data_source_unittest.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/webkit/glue/media/buffered_data_source_unittest.cc b/webkit/glue/media/buffered_data_source_unittest.cc
index 90f917d..fd07d4e 100644
--- a/webkit/glue/media/buffered_data_source_unittest.cc
+++ b/webkit/glue/media/buffered_data_source_unittest.cc
@@ -393,6 +393,7 @@ TEST_F(BufferedResourceLoaderTest, AllowDefer_NoDataReceived) {
// without receiving data in between.
DisallowLoaderDefer();
AllowLoaderDefer();
+ StopWhenLoad();
}
TEST_F(BufferedResourceLoaderTest, AllowDefer_ReadSameWindow) {
@@ -412,6 +413,7 @@ TEST_F(BufferedResourceLoaderTest, AllowDefer_ReadSameWindow) {
EXPECT_CALL(*this, ReadCallback(10));
ReadLoader(10, 10, buffer);
VerifyBuffer(buffer, 10, 10);
+ StopWhenLoad();
}
TEST_F(BufferedResourceLoaderTest, AllowDefer_ReadPastWindow) {
@@ -431,6 +433,7 @@ TEST_F(BufferedResourceLoaderTest, AllowDefer_ReadPastWindow) {
EXPECT_CALL(*this, ReadCallback(net::ERR_CACHE_MISS));
ReadLoader(10, 10, buffer);
+ StopWhenLoad();
}
TEST_F(BufferedResourceLoaderTest, AllowDefer_DeferredNoDataReceived) {
@@ -453,6 +456,7 @@ TEST_F(BufferedResourceLoaderTest, AllowDefer_DeferredNoDataReceived) {
EXPECT_CALL(*this, ReadCallback(10));
ReadLoader(20, 10, buffer);
VerifyBuffer(buffer, 20, 10);
+ StopWhenLoad();
}
TEST_F(BufferedResourceLoaderTest, AllowDefer_DeferredReadSameWindow) {
@@ -476,6 +480,7 @@ TEST_F(BufferedResourceLoaderTest, AllowDefer_DeferredReadSameWindow) {
EXPECT_CALL(*this, ReadCallback(10));
ReadLoader(20, 10, buffer);
VerifyBuffer(buffer, 20, 10);
+ StopWhenLoad();
}
TEST_F(BufferedResourceLoaderTest, AllowDefer_DeferredReadPastWindow) {
@@ -499,6 +504,7 @@ TEST_F(BufferedResourceLoaderTest, AllowDefer_DeferredReadPastWindow) {
EXPECT_CALL(*this, ReadCallback(net::ERR_CACHE_MISS));
ReadLoader(20, 5, buffer);
+ StopWhenLoad();
}
// TODO(hclam): add unit test for defer loading.