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

Unified Diff: chrome/browser/background_contents_service_unittest.cc

Issue 2866034: Refactor shutdown code to allow win/linux to run after last browser closes. (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: Uploaded patch that resolves merge issue Created 10 years, 5 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
« no previous file with comments | « chrome/browser/background_contents_service.cc ('k') | chrome/browser/browser.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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));
}
« no previous file with comments | « chrome/browser/background_contents_service.cc ('k') | chrome/browser/browser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698