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

Unified Diff: chrome/browser/extensions/extension_shelf_model_unittest.cc

Issue 147051: Clean up a few startup and shutdown dependencies which should fix some of the... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 6 months 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
Index: chrome/browser/extensions/extension_shelf_model_unittest.cc
===================================================================
--- chrome/browser/extensions/extension_shelf_model_unittest.cc (revision 19016)
+++ chrome/browser/extensions/extension_shelf_model_unittest.cc (working copy)
@@ -16,7 +16,7 @@
namespace {
// The extension we're using as our test case.
-const char* kExtensionId = "fc6f6ba6693faf6773c13701019f2e7a12f0febe";
+const char* kExtensionId = "behllobkkfkfnphdnhnkndlbkcpglgmj";
}; // namespace
@@ -40,16 +40,6 @@
InProcessBrowserTest::SetUp();
}
- virtual void TearDown() {
- // Tear down |model_| manually here rather than in the destructor or with
- // a scoped_ptr. Since it uses NotificationRegistrar, it needs to clean up
- // before the rest of InProcessBrowserTest.
- model_->RemoveObserver(this);
- delete model_;
- model_ = NULL;
- InProcessBrowserTest::TearDown();
- }
-
virtual void SetUpCommandLine(CommandLine* command_line) {
command_line->AppendSwitch(switches::kEnableExtensions);
}
@@ -88,7 +78,7 @@
FilePath path;
ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &path));
path = path.AppendASCII("extensions").
- AppendASCII("good").AppendASCII("extension1").AppendASCII("1");
+ AppendASCII("good").AppendASCII(kExtensionId).AppendASCII("1.0.0.0");
ASSERT_TRUE(file_util::DirectoryExists(path)); // sanity check
// Wait for the extension to load and grab a pointer to it.
@@ -112,4 +102,11 @@
EXPECT_EQ(one, model_->ToolstripAt(0));
EXPECT_EQ(1, model_->count());
EXPECT_EQ(removed_count_, 1);
+
+ // Tear down |model_| manually here rather than in the destructor or with
+ // a scoped_ptr. Since it uses NotificationRegistrar, it needs to clean up
+ // before the rest of InProcessBrowserTest.
Matt Perry 2009/06/23 23:05:35 update comment to explain why this isn't in TearDo
+ model_->RemoveObserver(this);
+ delete model_;
+ model_ = NULL;
}

Powered by Google App Engine
This is Rietveld 408576698