Chromium Code Reviews| 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; |
| } |