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

Unified Diff: chrome/browser/chromeos/policy/device_system_use_24hour_clock_browsertest.cc

Issue 2931643002: chromeos: Introduce ash::SystemTrayTestApi (Closed)
Patch Set: review comments Created 3 years, 6 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
« no previous file with comments | « ash/test/BUILD.gn ('k') | chrome/browser/chromeos/shutdown_policy_browsertest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/policy/device_system_use_24hour_clock_browsertest.cc
diff --git a/chrome/browser/chromeos/policy/device_system_use_24hour_clock_browsertest.cc b/chrome/browser/chromeos/policy/device_system_use_24hour_clock_browsertest.cc
index de44d021f25616e0f5019f9280701c37834175fd..233c124e4d2bdce063dbf8d46ff24cc5b6a46e4a 100644
--- a/chrome/browser/chromeos/policy/device_system_use_24hour_clock_browsertest.cc
+++ b/chrome/browser/chromeos/policy/device_system_use_24hour_clock_browsertest.cc
@@ -8,6 +8,7 @@
#include "ash/system/date/system_info_default_view.h"
#include "ash/system/date/tray_system_info.h"
#include "ash/system/tray/system_tray.h"
+#include "ash/system/tray/system_tray_test_api.h"
#include "base/command_line.h"
#include "base/location.h"
#include "base/macros.h"
@@ -73,11 +74,13 @@ class SystemUse24HourClockPolicyTest
->ShouldUse24HourClock();
}
+ static ash::TraySystemInfo* GetTraySystemInfo() {
+ return ash::SystemTrayTestApi(ash::Shell::Get()->GetPrimarySystemTray())
+ .tray_system_info();
+ }
+
static base::HourClockType TestGetPrimarySystemTrayTimeHourType() {
- const ash::TraySystemInfo* tray_system_info =
- ash::Shell::Get()
- ->GetPrimarySystemTray()
- ->GetTraySystemInfoForTesting();
+ const ash::TraySystemInfo* tray_system_info = GetTraySystemInfo();
const ash::tray::TimeView* time_tray =
tray_system_info->GetTimeTrayForTesting();
@@ -85,28 +88,20 @@ class SystemUse24HourClockPolicyTest
}
static bool TestPrimarySystemTrayHasDateDefaultView() {
- const ash::TraySystemInfo* tray_system_info =
- ash::Shell::Get()
- ->GetPrimarySystemTray()
- ->GetTraySystemInfoForTesting();
+ const ash::TraySystemInfo* tray_system_info = GetTraySystemInfo();
const ash::SystemInfoDefaultView* system_info_default_view =
tray_system_info->GetDefaultViewForTesting();
return system_info_default_view != nullptr;
}
static void TestPrimarySystemTrayCreateDefaultView() {
- ash::TraySystemInfo* tray_system_info = ash::Shell::Get()
- ->GetPrimarySystemTray()
- ->GetTraySystemInfoForTesting();
+ ash::TraySystemInfo* tray_system_info = GetTraySystemInfo();
tray_system_info->CreateDefaultViewForTesting(
ash::LoginStatus::NOT_LOGGED_IN);
}
static base::HourClockType TestGetPrimarySystemTrayDateHourType() {
- const ash::TraySystemInfo* tray_system_info =
- ash::Shell::Get()
- ->GetPrimarySystemTray()
- ->GetTraySystemInfoForTesting();
+ const ash::TraySystemInfo* tray_system_info = GetTraySystemInfo();
const ash::SystemInfoDefaultView* system_info_default_view =
tray_system_info->GetDefaultViewForTesting();
« no previous file with comments | « ash/test/BUILD.gn ('k') | chrome/browser/chromeos/shutdown_policy_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698