summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
authorshess@chromium.org <shess@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-11-12 01:14:28 +0000
committershess@chromium.org <shess@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-11-12 01:14:28 +0000
commitb890108601c2300f83a4a5b661b8a68c5a70cedb (patch)
tree19de3c8dc84f2ffa3835d8588b2decbba1941667 /chrome
parentcebdc48a3ce36dd1385661ea5b8219c82f769181 (diff)
downloadchromium_src-b890108601c2300f83a4a5b661b8a68c5a70cedb.zip
chromium_src-b890108601c2300f83a4a5b661b8a68c5a70cedb.tar.gz
chromium_src-b890108601c2300f83a4a5b661b8a68c5a70cedb.tar.bz2
Cleanup named shmem segment after DeferredResourceLoadingTest.
Otherwise the test fails if you run it twice because it leaves stuff in the tempdir. BUG=none TEST=none Review URL: http://codereview.chromium.org/4847002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@65886 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r--chrome/common/resource_dispatcher_unittest.cc8
1 files changed, 5 insertions, 3 deletions
diff --git a/chrome/common/resource_dispatcher_unittest.cc b/chrome/common/resource_dispatcher_unittest.cc
index f5828ff..e5d6dfd 100644
--- a/chrome/common/resource_dispatcher_unittest.cc
+++ b/chrome/common/resource_dispatcher_unittest.cc
@@ -30,6 +30,8 @@ static const char test_page_contents[] =
"<html><head><title>Google</title></head><body><h1>Google</h1></body></html>";
static const uint32 test_page_contents_len = arraysize(test_page_contents) - 1;
+static const char kShmemSegmentName[] = "DeferredResourceLoaderTest";
+
// Listens for request response data and stores it so that it can be compared
// to the reference data.
class TestRequestCallback : public ResourceLoaderBridge::Peer {
@@ -289,13 +291,14 @@ class DeferredResourceLoadingTest : public ResourceDispatcherTest,
protected:
virtual void SetUp() {
- EXPECT_EQ(true, shared_handle_.CreateNamed("DeferredResourceLoaderTest",
- false, 100));
ResourceDispatcherTest::SetUp();
+ shared_handle_.Delete(kShmemSegmentName);
+ EXPECT_EQ(true, shared_handle_.CreateNamed(kShmemSegmentName, false, 100));
}
virtual void TearDown() {
shared_handle_.Close();
+ EXPECT_TRUE(shared_handle_.Delete(kShmemSegmentName));
ResourceDispatcherTest::TearDown();
}
@@ -325,4 +328,3 @@ TEST_F(DeferredResourceLoadingTest, DeferredLoadTest) {
message_loop.RunAllPending();
delete bridge;
}
-