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

Side by Side Diff: chrome/browser/ui/views/ash/status_area_host_aura_browsertest.cc

Issue 9546013: Move IsRunningOnChromeOS to base/chromeos (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: chromeos_version,sync,cleanup Created 8 years, 9 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ash/shell.h" 5 #include "ash/shell.h"
6 #include "base/command_line.h" 6 #include "base/command_line.h"
7 #include "base/memory/scoped_ptr.h" 7 #include "base/memory/scoped_ptr.h"
8 #include "chrome/browser/chromeos/status/status_area_button.h" 8 #include "chrome/browser/chromeos/status/status_area_button.h"
9 #include "chrome/browser/profiles/profile_manager.h" 9 #include "chrome/browser/profiles/profile_manager.h"
10 #include "chrome/browser/chromeos/system/runtime_environment.h"
11 #include "chrome/browser/ui/browser.h" 10 #include "chrome/browser/ui/browser.h"
12 #include "chrome/browser/ui/browser_window.h" 11 #include "chrome/browser/ui/browser_window.h"
13 #include "chrome/browser/ui/views/ash/chrome_shell_delegate.h" 12 #include "chrome/browser/ui/views/ash/chrome_shell_delegate.h"
14 #include "chrome/browser/ui/views/ash/status_area_host_aura.h" 13 #include "chrome/browser/ui/views/ash/status_area_host_aura.h"
15 #include "chrome/common/chrome_notification_types.h" 14 #include "chrome/common/chrome_notification_types.h"
16 #include "chrome/common/chrome_switches.h" 15 #include "chrome/common/chrome_switches.h"
17 #include "chrome/test/base/in_process_browser_test.h" 16 #include "chrome/test/base/in_process_browser_test.h"
18 #include "chrome/test/base/ui_test_utils.h" 17 #include "chrome/test/base/ui_test_utils.h"
19 #include "content/public/browser/notification_service.h" 18 #include "content/public/browser/notification_service.h"
20 #include "ui/gfx/size.h" 19 #include "ui/gfx/size.h"
21 20
22 #if defined(OS_CHROMEOS) 21 #if defined(OS_CHROMEOS)
22 #include "base/chromeos/chromeos_version.h"
23 #include "chrome/browser/chromeos/login/screen_locker.h" 23 #include "chrome/browser/chromeos/login/screen_locker.h"
24 #include "chrome/browser/chromeos/login/screen_locker_tester.h" 24 #include "chrome/browser/chromeos/login/screen_locker_tester.h"
25 #include "chrome/browser/chromeos/login/user_manager.h" 25 #include "chrome/browser/chromeos/login/user_manager.h"
26 #endif 26 #endif
27 27
28 typedef InProcessBrowserTest StatusAreaHostAuraTest; 28 typedef InProcessBrowserTest StatusAreaHostAuraTest;
29 29
30 IN_PROC_BROWSER_TEST_F(StatusAreaHostAuraTest, TextStyle) { 30 IN_PROC_BROWSER_TEST_F(StatusAreaHostAuraTest, TextStyle) {
31 ChromeShellDelegate* delegate = static_cast<ChromeShellDelegate*>( 31 ChromeShellDelegate* delegate = static_cast<ChromeShellDelegate*>(
32 ash::Shell::GetInstance()->delegate()); 32 ash::Shell::GetInstance()->delegate());
33 StatusAreaHostAura* host = delegate->status_area_host(); 33 StatusAreaHostAura* host = delegate->status_area_host();
34 34
35 #if defined(OS_CHROMEOS) 35 #if defined(OS_CHROMEOS)
36 ASSERT_FALSE(chromeos::UserManager::Get()->IsUserLoggedIn()); 36 ASSERT_FALSE(chromeos::UserManager::Get()->IsUserLoggedIn());
37 if (chromeos::system::runtime_environment::IsRunningOnChromeOS()) { 37 if (base::chromeos::IsRunningOnChromeOS()) {
38 EXPECT_EQ(StatusAreaButton::GRAY_PLAIN_LIGHT, 38 EXPECT_EQ(StatusAreaButton::GRAY_PLAIN_LIGHT,
39 host->GetStatusAreaTextStyle()); 39 host->GetStatusAreaTextStyle());
40 } else { 40 } else {
41 EXPECT_EQ(StatusAreaButton::WHITE_HALOED_BOLD, 41 EXPECT_EQ(StatusAreaButton::WHITE_HALOED_BOLD,
42 host->GetStatusAreaTextStyle()); 42 host->GetStatusAreaTextStyle());
43 } 43 }
44 44
45 // ProfileManager expects a profile dir to be set on Chrome OS. 45 // ProfileManager expects a profile dir to be set on Chrome OS.
46 CommandLine::ForCurrentProcess()->AppendSwitchNative( 46 CommandLine::ForCurrentProcess()->AppendSwitchNative(
47 switches::kLoginProfile, "StatusAreaHostAuraTest"); 47 switches::kLoginProfile, "StatusAreaHostAuraTest");
(...skipping 22 matching lines...) Expand all
70 chromeos::ScreenLocker::Hide(); 70 chromeos::ScreenLocker::Hide();
71 ui_test_utils::RunAllPendingInMessageLoop(); 71 ui_test_utils::RunAllPendingInMessageLoop();
72 ASSERT_FALSE(tester->IsLocked()); 72 ASSERT_FALSE(tester->IsLocked());
73 73
74 EXPECT_EQ(StatusAreaButton::WHITE_HALOED_BOLD, 74 EXPECT_EQ(StatusAreaButton::WHITE_HALOED_BOLD,
75 host->GetStatusAreaTextStyle()); 75 host->GetStatusAreaTextStyle());
76 #endif 76 #endif
77 77
78 browser->CloseWindow(); 78 browser->CloseWindow();
79 } 79 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/ash/status_area_host_aura.cc ('k') | chrome/browser/ui/views/frame/browser_frame.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698