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 fb3d36263514dd5cec504a6c03f6c2121d48b444..074cf3965589ac17d9bda3a52df5be03b7294a5e 100644 |
--- a/chrome/browser/ui/ash/screenshot_taker_unittest.cc |
+++ b/chrome/browser/ui/ash/screenshot_taker_unittest.cc |
@@ -63,7 +63,7 @@ class ScreenshotTakerTest : public AshTestBase, |
protected: |
// ScreenshotTakerTest is a friend of ScreenshotTaker and therefore |
- // allowed to set the directory and basename. |
+ // allowed to set the directory, basename and profile. |
void SetScreenshotDirectoryForTest( |
ScreenshotTaker* screenshot_taker, |
const base::FilePath& screenshot_directory) { |
@@ -74,6 +74,11 @@ class ScreenshotTakerTest : public AshTestBase, |
const std::string& screenshot_basename) { |
screenshot_taker->SetScreenshotBasenameForTest(screenshot_basename); |
} |
+ void SetScreenshotProfileForTest( |
+ ScreenshotTaker* screenshot_taker, |
+ Profile* profile) { |
+ screenshot_taker->SetScreenshotProfileForTest(profile); |
+ } |
void Wait() { |
if (screenshot_complete_) |
@@ -97,12 +102,13 @@ class ScreenshotTakerTest : public AshTestBase, |
TEST_F(ScreenshotTakerTest, TakeScreenshot) { |
TestingProfile profile; |
- ScreenshotTaker screenshot_taker(&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); |
EXPECT_TRUE(screenshot_taker.CanTakeScreenshot()); |