OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "ash/system/date/date_default_view.h" | 6 #include "ash/system/date/date_default_view.h" |
7 #include "ash/system/date/date_view.h" | 7 #include "ash/system/date/date_view.h" |
8 #include "ash/system/user/login_status.h" | 8 #include "ash/system/user/login_status.h" |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/location.h" | 10 #include "base/location.h" |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
85 ->GetTrayDateForTesting(); | 85 ->GetTrayDateForTesting(); |
86 const ash::DateDefaultView* date_default_view = | 86 const ash::DateDefaultView* date_default_view = |
87 tray_date->GetDefaultViewForTesting(); | 87 tray_date->GetDefaultViewForTesting(); |
88 return (date_default_view != NULL); | 88 return (date_default_view != NULL); |
89 } | 89 } |
90 | 90 |
91 static void TestPrimarySystemTrayCreateDefaultView() { | 91 static void TestPrimarySystemTrayCreateDefaultView() { |
92 ash::TrayDate* tray_date = ash::Shell::GetInstance() | 92 ash::TrayDate* tray_date = ash::Shell::GetInstance() |
93 ->GetPrimarySystemTray() | 93 ->GetPrimarySystemTray() |
94 ->GetTrayDateForTesting(); | 94 ->GetTrayDateForTesting(); |
95 tray_date->CreateDefaultViewForTesting(ash::user::LOGGED_IN_NONE); | 95 tray_date->CreateDefaultViewForTesting(ash::LoginStatus::NOT_LOGGED_IN); |
96 } | 96 } |
97 | 97 |
98 static base::HourClockType TestGetPrimarySystemTrayDateHourType() { | 98 static base::HourClockType TestGetPrimarySystemTrayDateHourType() { |
99 const ash::TrayDate* tray_date = ash::Shell::GetInstance() | 99 const ash::TrayDate* tray_date = ash::Shell::GetInstance() |
100 ->GetPrimarySystemTray() | 100 ->GetPrimarySystemTray() |
101 ->GetTrayDateForTesting(); | 101 ->GetTrayDateForTesting(); |
102 const ash::DateDefaultView* date_default_view = | 102 const ash::DateDefaultView* date_default_view = |
103 tray_date->GetDefaultViewForTesting(); | 103 tray_date->GetDefaultViewForTesting(); |
104 | 104 |
105 return date_default_view->GetDateView()->GetHourTypeForTesting(); | 105 return date_default_view->GetDateView()->GetHourTypeForTesting(); |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
167 EXPECT_TRUE(CrosSettings::Get()->GetBoolean(kSystemUse24HourClock, | 167 EXPECT_TRUE(CrosSettings::Get()->GetBoolean(kSystemUse24HourClock, |
168 &system_use_24hour_clock)); | 168 &system_use_24hour_clock)); |
169 EXPECT_FALSE(system_use_24hour_clock); | 169 EXPECT_FALSE(system_use_24hour_clock); |
170 EXPECT_FALSE(GetSystemTrayDelegateShouldUse24HourClock()); | 170 EXPECT_FALSE(GetSystemTrayDelegateShouldUse24HourClock()); |
171 EXPECT_EQ(base::k12HourClock, TestGetPrimarySystemTrayTimeHourType()); | 171 EXPECT_EQ(base::k12HourClock, TestGetPrimarySystemTrayTimeHourType()); |
172 EXPECT_TRUE(TestPrimarySystemTrayHasDateDefaultView()); | 172 EXPECT_TRUE(TestPrimarySystemTrayHasDateDefaultView()); |
173 EXPECT_EQ(base::k12HourClock, TestGetPrimarySystemTrayDateHourType()); | 173 EXPECT_EQ(base::k12HourClock, TestGetPrimarySystemTrayDateHourType()); |
174 } | 174 } |
175 | 175 |
176 } // namespace chromeos | 176 } // namespace chromeos |
OLD | NEW |