| Index: chrome/browser/background_contents_service_unittest.cc
|
| diff --git a/chrome/browser/background_contents_service_unittest.cc b/chrome/browser/background_contents_service_unittest.cc
|
| index 8e4394ed3e84e2a55c435d2f6935d2bebd7ca0a5..6383e2fccc976508cf87be6c9818ed075c1b3eca 100644
|
| --- a/chrome/browser/background_contents_service_unittest.cc
|
| +++ b/chrome/browser/background_contents_service_unittest.cc
|
| @@ -8,6 +8,7 @@
|
| #include "base/scoped_ptr.h"
|
| #include "base/utf_string_conversions.h"
|
| #include "chrome/browser/background_contents_service.h"
|
| +#include "chrome/browser/browser_list.h"
|
| #include "chrome/browser/pref_service.h"
|
| #include "chrome/browser/tab_contents/background_contents.h"
|
| #include "chrome/common/chrome_switches.h"
|
| @@ -112,20 +113,14 @@ TEST_F(BackgroundContentsServiceTest, Create) {
|
| TEST_F(BackgroundContentsServiceTest, BackgroundContentsCreateDestroy) {
|
| TestingProfile profile;
|
| BackgroundContentsService service(&profile, command_line_.get());
|
| - // TODO(atwilson): Enable the refcount part of the test once we fix the
|
| - // APP_TERMINATING notification to be sent at the proper time.
|
| - // (http://crbug.com/45275).
|
| - //
|
| - // TestingBrowserProcess* process =
|
| - // static_cast<TestingBrowserProcess*>(g_browser_process);
|
| - // unsigned int starting_ref_count = process->module_ref_count();
|
| MockBackgroundContents* contents = new MockBackgroundContents(&profile);
|
| EXPECT_FALSE(service.IsTracked(contents));
|
| + EXPECT_FALSE(BrowserList::WillKeepAlive());
|
| contents->SendOpenedNotification();
|
| - // EXPECT_EQ(starting_ref_count+1, process->module_ref_count());
|
| + EXPECT_TRUE(BrowserList::WillKeepAlive());
|
| EXPECT_TRUE(service.IsTracked(contents));
|
| delete contents;
|
| - // EXPECT_EQ(starting_ref_count, process->module_ref_count());
|
| + EXPECT_FALSE(BrowserList::WillKeepAlive());
|
| EXPECT_FALSE(service.IsTracked(contents));
|
| }
|
|
|
|
|