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

Side by Side Diff: chrome/browser/chromeos/policy/device_system_use_24hour_clock_browsertest.cc

Issue 1610823003: Migrate call sites LoginDisplayHostImpl::default_host to LoginDisplayHost. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@fix-add-supervised-user
Patch Set: Address comments Created 4 years, 11 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
OLDNEW
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/macros.h" 10 #include "base/macros.h"
11 #include "base/message_loop/message_loop.h" 11 #include "base/message_loop/message_loop.h"
12 #include "chrome/browser/chromeos/login/ui/login_display_host_impl.h" 12 #include "chrome/browser/chromeos/login/ui/login_display_host.h"
13 #include "chrome/browser/chromeos/policy/device_policy_cros_browser_test.h" 13 #include "chrome/browser/chromeos/policy/device_policy_cros_browser_test.h"
14 #include "chrome/browser/chromeos/policy/proto/chrome_device_policy.pb.h" 14 #include "chrome/browser/chromeos/policy/proto/chrome_device_policy.pb.h"
15 #include "chrome/browser/chromeos/settings/cros_settings.h" 15 #include "chrome/browser/chromeos/settings/cros_settings.h"
16 #include "chrome/browser/lifetime/application_lifetime.h" 16 #include "chrome/browser/lifetime/application_lifetime.h"
17 #include "chrome/browser/ui/ash/system_tray_delegate_chromeos.h" 17 #include "chrome/browser/ui/ash/system_tray_delegate_chromeos.h"
18 #include "chromeos/chromeos_switches.h" 18 #include "chromeos/chromeos_switches.h"
19 #include "content/public/test/test_utils.h" 19 #include "content/public/test/test_utils.h"
20 #include "testing/gtest/include/gtest/gtest.h" 20 #include "testing/gtest/include/gtest/gtest.h"
21 21
22 namespace em = enterprise_management; 22 namespace em = enterprise_management;
(...skipping 12 matching lines...) Expand all
35 } 35 }
36 36
37 void SetUpInProcessBrowserTestFixture() override { 37 void SetUpInProcessBrowserTestFixture() override {
38 InstallOwnerKey(); 38 InstallOwnerKey();
39 MarkAsEnterpriseOwned(); 39 MarkAsEnterpriseOwned();
40 DevicePolicyCrosBrowserTest::SetUpInProcessBrowserTestFixture(); 40 DevicePolicyCrosBrowserTest::SetUpInProcessBrowserTestFixture();
41 } 41 }
42 42
43 void TearDownOnMainThread() override { 43 void TearDownOnMainThread() override {
44 // If the login display is still showing, exit gracefully. 44 // If the login display is still showing, exit gracefully.
45 if (LoginDisplayHostImpl::default_host()) { 45 if (LoginDisplayHost::default_host()) {
46 base::MessageLoop::current()->PostTask(FROM_HERE, 46 base::MessageLoop::current()->PostTask(FROM_HERE,
47 base::Bind(&chrome::AttemptExit)); 47 base::Bind(&chrome::AttemptExit));
48 content::RunMessageLoop(); 48 content::RunMessageLoop();
49 } 49 }
50 } 50 }
51 51
52 protected: 52 protected:
53 void RefreshPolicyAndWaitDeviceSettingsUpdated() { 53 void RefreshPolicyAndWaitDeviceSettingsUpdated() {
54 scoped_ptr<CrosSettings::ObserverSubscription> observer = 54 scoped_ptr<CrosSettings::ObserverSubscription> observer =
55 CrosSettings::Get()->AddSettingsObserver( 55 CrosSettings::Get()->AddSettingsObserver(
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 EXPECT_TRUE(CrosSettings::Get()->GetBoolean(kSystemUse24HourClock, 164 EXPECT_TRUE(CrosSettings::Get()->GetBoolean(kSystemUse24HourClock,
165 &system_use_24hour_clock)); 165 &system_use_24hour_clock));
166 EXPECT_FALSE(system_use_24hour_clock); 166 EXPECT_FALSE(system_use_24hour_clock);
167 EXPECT_FALSE(GetSystemTrayDelegateShouldUse24HourClock()); 167 EXPECT_FALSE(GetSystemTrayDelegateShouldUse24HourClock());
168 EXPECT_EQ(base::k12HourClock, TestGetPrimarySystemTrayTimeHourType()); 168 EXPECT_EQ(base::k12HourClock, TestGetPrimarySystemTrayTimeHourType());
169 EXPECT_TRUE(TestPrimarySystemTrayHasDateDefaultView()); 169 EXPECT_TRUE(TestPrimarySystemTrayHasDateDefaultView());
170 EXPECT_EQ(base::k12HourClock, TestGetPrimarySystemTrayDateHourType()); 170 EXPECT_EQ(base::k12HourClock, TestGetPrimarySystemTrayDateHourType());
171 } 171 }
172 172
173 } // namespace chromeos 173 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698