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

Unified Diff: ash/test/test_system_tray_delegate.cc

Issue 2060003002: ash: Add a unit test for the system update tray item (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@movetraydelegate
Patch Set: rebase Created 4 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/test_system_tray_delegate.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/test/test_system_tray_delegate.cc
diff --git a/ash/test/test_system_tray_delegate.cc b/ash/test/test_system_tray_delegate.cc
index 0d5ef0e39fd143451eacec5bd503550d54729d02..9c06c0627b6e73443a645db1b432ade04f2556d0 100644
--- a/ash/test/test_system_tray_delegate.cc
+++ b/ash/test/test_system_tray_delegate.cc
@@ -17,6 +17,7 @@ namespace test {
namespace {
+bool g_system_update_required = false;
LoginStatus g_initial_status = LoginStatus::USER;
} // namespace
@@ -35,6 +36,11 @@ void TestSystemTrayDelegate::SetInitialLoginStatus(LoginStatus login_status) {
g_initial_status = login_status;
}
+// static
+void TestSystemTrayDelegate::SetSystemUpdateRequired(bool required) {
+ g_system_update_required = required;
+}
+
void TestSystemTrayDelegate::SetLoginStatus(LoginStatus login_status) {
login_status_ = login_status;
Shell::GetInstance()->UpdateAfterLoginStatusChange(login_status);
@@ -73,6 +79,13 @@ bool TestSystemTrayDelegate::IsUserSupervised() const {
return login_status_ == LoginStatus::SUPERVISED;
}
+void TestSystemTrayDelegate::GetSystemUpdateInfo(UpdateInfo* info) const {
+ DCHECK(info);
+ info->severity = UpdateInfo::UPDATE_NORMAL;
+ info->update_required = g_system_update_required;
+ info->factory_reset_required = false;
+}
+
bool TestSystemTrayDelegate::ShouldShowDisplayNotification() {
return should_show_display_notification_;
}
« no previous file with comments | « ash/test/test_system_tray_delegate.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698