OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/common/accessibility_types.h" | 5 #include "ash/common/accessibility_types.h" |
6 #include "ash/common/login_status.h" | 6 #include "ash/common/login_status.h" |
7 #include "ash/common/material_design/material_design_controller.h" | 7 #include "ash/common/material_design/material_design_controller.h" |
8 #include "ash/common/system/tray/system_tray.h" | 8 #include "ash/common/system/tray/system_tray.h" |
9 #include "ash/common/system/tray_accessibility.h" | 9 #include "ash/common/system/tray_accessibility.h" |
10 #include "ash/common/test/test_session_state_delegate.h" | 10 #include "ash/common/test/test_session_state_delegate.h" |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 | 101 |
102 void SetShowAccessibilityOptionsInSystemTrayMenu(bool value) { | 102 void SetShowAccessibilityOptionsInSystemTrayMenu(bool value) { |
103 if (GetParam() == PREF_SERVICE) { | 103 if (GetParam() == PREF_SERVICE) { |
104 PrefService* prefs = GetProfile()->GetPrefs(); | 104 PrefService* prefs = GetProfile()->GetPrefs(); |
105 prefs->SetBoolean(prefs::kShouldAlwaysShowAccessibilityMenu, value); | 105 prefs->SetBoolean(prefs::kShouldAlwaysShowAccessibilityMenu, value); |
106 } else if (GetParam() == POLICY) { | 106 } else if (GetParam() == POLICY) { |
107 policy::PolicyMap policy_map; | 107 policy::PolicyMap policy_map; |
108 policy_map.Set(policy::key::kShowAccessibilityOptionsInSystemTrayMenu, | 108 policy_map.Set(policy::key::kShowAccessibilityOptionsInSystemTrayMenu, |
109 policy::POLICY_LEVEL_MANDATORY, policy::POLICY_SCOPE_USER, | 109 policy::POLICY_LEVEL_MANDATORY, policy::POLICY_SCOPE_USER, |
110 policy::POLICY_SOURCE_CLOUD, | 110 policy::POLICY_SOURCE_CLOUD, |
111 base::MakeUnique<base::FundamentalValue>(value), nullptr); | 111 base::MakeUnique<base::Value>(value), nullptr); |
112 provider_.UpdateChromePolicy(policy_map); | 112 provider_.UpdateChromePolicy(policy_map); |
113 base::RunLoop().RunUntilIdle(); | 113 base::RunLoop().RunUntilIdle(); |
114 } else { | 114 } else { |
115 FAIL() << "Unknown test parameterization"; | 115 FAIL() << "Unknown test parameterization"; |
116 } | 116 } |
117 } | 117 } |
118 | 118 |
119 ash::TrayAccessibility* tray() { | 119 ash::TrayAccessibility* tray() { |
120 return ash::Shell::GetInstance()->GetPrimarySystemTray()-> | 120 return ash::Shell::GetInstance()->GetPrimarySystemTray()-> |
121 GetTrayAccessibilityForTest(); | 121 GetTrayAccessibilityForTest(); |
(...skipping 791 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
913 EXPECT_FALSE(IsSettingsAvailableOnDetailMenu()); | 913 EXPECT_FALSE(IsSettingsAvailableOnDetailMenu()); |
914 CloseDetailMenu(); | 914 CloseDetailMenu(); |
915 } | 915 } |
916 | 916 |
917 INSTANTIATE_TEST_CASE_P(TrayAccessibilityTestInstance, | 917 INSTANTIATE_TEST_CASE_P(TrayAccessibilityTestInstance, |
918 TrayAccessibilityTest, | 918 TrayAccessibilityTest, |
919 testing::Values(PREF_SERVICE, | 919 testing::Values(PREF_SERVICE, |
920 POLICY)); | 920 POLICY)); |
921 | 921 |
922 } // namespace chromeos | 922 } // namespace chromeos |
OLD | NEW |