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

Unified Diff: chrome/browser/background_page_tracker_unittest.cc

Issue 6478005: GTTF: Use a fresh TestingBrowserProcess for each test, part #1 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: make more tests use the new base class Created 9 years, 10 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_mode_manager_unittest.cc ('k') | chrome/chrome_tests.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/background_page_tracker_unittest.cc
diff --git a/chrome/browser/background_page_tracker_unittest.cc b/chrome/browser/background_page_tracker_unittest.cc
index 74fd7eaa500b05fd1aa027467a4c792894636ac4..dcba51cc5b5a45667fb379f4e291ee092050666d 100644
--- a/chrome/browser/background_page_tracker_unittest.cc
+++ b/chrome/browser/background_page_tracker_unittest.cc
@@ -8,6 +8,8 @@
#include "chrome/browser/background_page_tracker.h"
#include "chrome/common/notification_service.h"
#include "chrome/common/notification_type.h"
+#include "chrome/test/testing_browser_process.h"
+#include "chrome/test/testing_browser_process_test.h"
#include "chrome/test/testing_pref_service.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "testing/platform_test.h"
@@ -25,13 +27,16 @@ class MockBackgroundPageTracker : public BackgroundPageTracker {
TestingPrefService prefs_;
};
-TEST(BackgroundPageTrackerTest, Create) {
+class BackgroundPageTrackerTest : public TestingBrowserProcessTest {
+};
+
+TEST_F(BackgroundPageTrackerTest, Create) {
MockBackgroundPageTracker tracker;
EXPECT_EQ(0, tracker.GetBackgroundPageCount());
EXPECT_EQ(0, tracker.GetUnacknowledgedBackgroundPageCount());
}
-TEST(BackgroundPageTrackerTest, OnBackgroundPageLoaded) {
+TEST_F(BackgroundPageTrackerTest, OnBackgroundPageLoaded) {
MockBackgroundPageTracker tracker;
EXPECT_EQ(0, tracker.GetBackgroundPageCount());
EXPECT_EQ(0, tracker.GetUnacknowledgedBackgroundPageCount());
@@ -56,7 +61,7 @@ TEST(BackgroundPageTrackerTest, OnBackgroundPageLoaded) {
EXPECT_EQ(0, tracker.GetUnacknowledgedBackgroundPageCount());
}
-TEST(BackgroundPageTrackerTest, AcknowledgeBackgroundPages) {
+TEST_F(BackgroundPageTrackerTest, AcknowledgeBackgroundPages) {
MockBackgroundPageTracker tracker;
EXPECT_EQ(0, tracker.GetBackgroundPageCount());
EXPECT_EQ(0, tracker.GetUnacknowledgedBackgroundPageCount());
@@ -95,7 +100,7 @@ class BadgeChangedNotificationCounter : public NotificationObserver {
NotificationRegistrar registrar_;
};
-TEST(BackgroundPageTrackerTest, TestTrackerChangedNotifications) {
+TEST_F(BackgroundPageTrackerTest, TestTrackerChangedNotifications) {
MockBackgroundPageTracker tracker;
BadgeChangedNotificationCounter counter;
std::string app1 = "app_id_1";
« no previous file with comments | « chrome/browser/background_mode_manager_unittest.cc ('k') | chrome/chrome_tests.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698