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

Unified Diff: chrome/browser/ui/ash/screenshot_taker_unittest.cc

Issue 20066003: Update notification settings to allow for multiprofile situations. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: And remove unneeded include. Created 7 years, 4 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/notifications/notification_ui_manager_mac.mm ('k') | chrome/chrome_tests_unit.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/ash/screenshot_taker_unittest.cc
diff --git a/chrome/browser/ui/ash/screenshot_taker_unittest.cc b/chrome/browser/ui/ash/screenshot_taker_unittest.cc
index 439a6a1ad98889d1e7416ad9fa1f2517be31c043..a35339af4ccfcc8faca9782b3691c5233a461288 100644
--- a/chrome/browser/ui/ash/screenshot_taker_unittest.cc
+++ b/chrome/browser/ui/ash/screenshot_taker_unittest.cc
@@ -14,9 +14,9 @@
#include "chrome/browser/browser_process.h"
#include "chrome/browser/notifications/notification_ui_manager.h"
#include "chrome/test/base/in_process_browser_test.h"
-#include "chrome/test/base/scoped_testing_local_state.h"
#include "chrome/test/base/testing_browser_process.h"
#include "chrome/test/base/testing_profile.h"
+#include "chrome/test/base/testing_profile_manager.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/test/test_utils.h"
#include "ui/aura/root_window.h"
@@ -36,13 +36,10 @@ class ScreenshotTakerTest : public AshTestBase,
virtual void SetUp() {
AshTestBase::SetUp();
- local_state_.reset(
- new ScopedTestingLocalState(TestingBrowserProcess::GetGlobal()));
}
virtual void TearDown() {
RunAllPendingInMessageLoop();
- local_state_.reset();
AshTestBase::TearDown();
}
@@ -87,7 +84,6 @@ class ScreenshotTakerTest : public AshTestBase,
EXPECT_TRUE(screenshot_complete_);
}
- scoped_ptr<ScopedTestingLocalState> local_state_;
bool running_;
bool screenshot_complete_;
ScreenshotTakerObserver::Result screenshot_result_;
@@ -98,14 +94,18 @@ class ScreenshotTakerTest : public AshTestBase,
};
TEST_F(ScreenshotTakerTest, TakeScreenshot) {
- TestingProfile profile;
+ scoped_ptr<TestingProfileManager> profile_manager(
+ new TestingProfileManager(TestingBrowserProcess::GetGlobal()));
+ ASSERT_TRUE(profile_manager->SetUp());
+ TestingProfile* profile =
+ profile_manager->CreateTestingProfile("test_profile");
ScreenshotTaker screenshot_taker;
screenshot_taker.AddObserver(this);
base::ScopedTempDir directory;
ASSERT_TRUE(directory.CreateUniqueTempDir());
SetScreenshotDirectoryForTest(&screenshot_taker, directory.path());
SetScreenshotBasenameForTest(&screenshot_taker, "Screenshot");
- SetScreenshotProfileForTest(&screenshot_taker, &profile);
+ SetScreenshotProfileForTest(&screenshot_taker, profile);
EXPECT_TRUE(screenshot_taker.CanTakeScreenshot());
« no previous file with comments | « chrome/browser/notifications/notification_ui_manager_mac.mm ('k') | chrome/chrome_tests_unit.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698