| 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/message_loop/message_loop.h" | 10 #include "base/message_loop/message_loop.h" |
| 11 #include "chrome/browser/chromeos/policy/device_policy_cros_browser_test.h" | 11 #include "chrome/browser/chromeos/policy/device_policy_cros_browser_test.h" |
| 12 #include "chrome/browser/chromeos/policy/proto/chrome_device_policy.pb.h" | 12 #include "chrome/browser/chromeos/policy/proto/chrome_device_policy.pb.h" |
| 13 #include "chrome/browser/chromeos/settings/cros_settings.h" | 13 #include "chrome/browser/chromeos/settings/cros_settings.h" |
| 14 #include "chrome/browser/ui/ash/system_tray_delegate_chromeos.h" | 14 #include "chrome/browser/ui/ash/system_tray_delegate_chromeos.h" |
| 15 #include "chromeos/chromeos_switches.h" | 15 #include "chromeos/chromeos_switches.h" |
| 16 #include "testing/gtest/include/gtest/gtest.h" | 16 #include "testing/gtest/include/gtest/gtest.h" |
| 17 | 17 |
| 18 namespace em = enterprise_management; | 18 namespace em = enterprise_management; |
| 19 | 19 |
| 20 namespace chromeos { | 20 namespace chromeos { |
| 21 | 21 |
| 22 class SystemUse24HourClockPolicyTest | 22 class SystemUse24HourClockPolicyTest |
| 23 : public policy::DevicePolicyCrosBrowserTest { | 23 : public policy::DevicePolicyCrosBrowserTest { |
| 24 public: | 24 public: |
| 25 SystemUse24HourClockPolicyTest() { | 25 SystemUse24HourClockPolicyTest() { |
| 26 } | 26 } |
| 27 | 27 |
| 28 virtual void SetUpCommandLine(CommandLine* command_line) override { | 28 virtual void SetUpCommandLine(base::CommandLine* command_line) override { |
| 29 command_line->AppendSwitch(switches::kLoginManager); | 29 command_line->AppendSwitch(switches::kLoginManager); |
| 30 command_line->AppendSwitch(chromeos::switches::kForceLoginManagerInTests); | 30 command_line->AppendSwitch(chromeos::switches::kForceLoginManagerInTests); |
| 31 } | 31 } |
| 32 | 32 |
| 33 virtual void SetUpInProcessBrowserTestFixture() override { | 33 virtual void SetUpInProcessBrowserTestFixture() override { |
| 34 InstallOwnerKey(); | 34 InstallOwnerKey(); |
| 35 MarkAsEnterpriseOwned(); | 35 MarkAsEnterpriseOwned(); |
| 36 DevicePolicyCrosBrowserTest::SetUpInProcessBrowserTestFixture(); | 36 DevicePolicyCrosBrowserTest::SetUpInProcessBrowserTestFixture(); |
| 37 } | 37 } |
| 38 | 38 |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 151 EXPECT_TRUE(CrosSettings::Get()->GetBoolean(kSystemUse24HourClock, | 151 EXPECT_TRUE(CrosSettings::Get()->GetBoolean(kSystemUse24HourClock, |
| 152 &system_use_24hour_clock)); | 152 &system_use_24hour_clock)); |
| 153 EXPECT_FALSE(system_use_24hour_clock); | 153 EXPECT_FALSE(system_use_24hour_clock); |
| 154 EXPECT_FALSE(GetSystemTrayDelegateShouldUse24HourClock()); | 154 EXPECT_FALSE(GetSystemTrayDelegateShouldUse24HourClock()); |
| 155 EXPECT_EQ(base::k12HourClock, TestGetPrimarySystemTrayTimeHourType()); | 155 EXPECT_EQ(base::k12HourClock, TestGetPrimarySystemTrayTimeHourType()); |
| 156 EXPECT_TRUE(TestPrimarySystemTrayHasDateDefaultView()); | 156 EXPECT_TRUE(TestPrimarySystemTrayHasDateDefaultView()); |
| 157 EXPECT_EQ(base::k12HourClock, TestGetPrimarySystemTrayDateHourType()); | 157 EXPECT_EQ(base::k12HourClock, TestGetPrimarySystemTrayDateHourType()); |
| 158 } | 158 } |
| 159 | 159 |
| 160 } // namespace chromeos | 160 } // namespace chromeos |
| OLD | NEW |