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

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

Issue 1960293003: Remove OS_CHROMEOS from ui/ash code (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 7 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
Index: chrome/browser/ui/ash/chrome_screenshot_grabber_unittest.cc
diff --git a/chrome/browser/ui/ash/chrome_screenshot_grabber_unittest.cc b/chrome/browser/ui/ash/chrome_screenshot_grabber_unittest.cc
index 6cb79249fcf46ff3f750cebd110bdf74d99784b5..d3050f8b13f81bce4ca4b0d267839df629b0ff95 100644
--- a/chrome/browser/ui/ash/chrome_screenshot_grabber_unittest.cc
+++ b/chrome/browser/ui/ash/chrome_screenshot_grabber_unittest.cc
@@ -20,14 +20,11 @@
#include "chrome/test/base/testing_browser_process.h"
#include "chrome/test/base/testing_profile.h"
#include "chrome/test/base/testing_profile_manager.h"
+#include "chromeos/login/login_state.h"
#include "content/public/test/test_utils.h"
#include "ui/aura/window_event_dispatcher.h"
#include "ui/snapshot/screenshot_grabber.h"
-#if defined(OS_CHROMEOS)
-#include "chromeos/login/login_state.h"
-#endif
-
namespace ash {
namespace test {
@@ -104,12 +101,11 @@ class ChromeScreenshotGrabberTest : public AshTestBase,
};
TEST_F(ChromeScreenshotGrabberTest, TakeScreenshot) {
-#if defined(OS_CHROMEOS)
// Note that within the test framework the LoginState object will always
// claim that the user did log in.
ASSERT_FALSE(chromeos::LoginState::IsInitialized());
chromeos::LoginState::Initialize();
-#endif
+
base::ScopedTempDir directory;
ASSERT_TRUE(directory.CreateUniqueTempDir());
EXPECT_TRUE(chrome_screenshot_grabber()->CanTakeScreenshot());
@@ -122,22 +118,18 @@ TEST_F(ChromeScreenshotGrabberTest, TakeScreenshot) {
Wait();
-#if defined(OS_CHROMEOS)
// Screenshot notifications on Windows not yet turned on.
EXPECT_TRUE(g_browser_process->notification_ui_manager()->FindById(
std::string("screenshot"),
NotificationUIManager::GetProfileID(profile_)) != NULL);
g_browser_process->notification_ui_manager()->CancelAll();
-#endif
EXPECT_EQ(ScreenshotGrabberObserver::SCREENSHOT_SUCCESS, screenshot_result_);
if (ScreenshotGrabberObserver::SCREENSHOT_SUCCESS == screenshot_result_)
EXPECT_TRUE(base::PathExists(screenshot_path_));
-#if defined(OS_CHROMEOS)
chromeos::LoginState::Shutdown();
-#endif
}
} // namespace test
« no previous file with comments | « chrome/browser/ui/ash/chrome_screenshot_grabber.cc ('k') | chrome/browser/ui/ash/chrome_shell_content_state.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698