| 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 <algorithm> | 5 #include <algorithm> |
| 6 #include <string> | 6 #include <string> |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "ash/display/display_manager.h" | 9 #include "ash/display/display_manager.h" |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 2855 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2866 EXPECT_FALSE(audio_handler->IsOutputMuted()); | 2866 EXPECT_FALSE(audio_handler->IsOutputMuted()); |
| 2867 EXPECT_EQ(1, test_observer->output_mute_changed_count()); | 2867 EXPECT_EQ(1, test_observer->output_mute_changed_count()); |
| 2868 audio_handler->SetOutputMute(true); | 2868 audio_handler->SetOutputMute(true); |
| 2869 EXPECT_TRUE(audio_handler->IsOutputMuted()); | 2869 EXPECT_TRUE(audio_handler->IsOutputMuted()); |
| 2870 EXPECT_EQ(2, test_observer->output_mute_changed_count()); | 2870 EXPECT_EQ(2, test_observer->output_mute_changed_count()); |
| 2871 // Revert the prior state. | 2871 // Revert the prior state. |
| 2872 audio_handler->SetOutputMute(prior_state); | 2872 audio_handler->SetOutputMute(prior_state); |
| 2873 audio_handler->RemoveAudioObserver(test_observer.get()); | 2873 audio_handler->RemoveAudioObserver(test_observer.get()); |
| 2874 } | 2874 } |
| 2875 | 2875 |
| 2876 // Disabled, see http://crbug.com/315308. | 2876 IN_PROC_BROWSER_TEST_F(PolicyTest, PRE_SessionLengthLimit) { |
| 2877 IN_PROC_BROWSER_TEST_F(PolicyTest, DISABLED_PRE_SessionLengthLimit) { | |
| 2878 // Indicate that the session started 2 hours ago and no user activity has | 2877 // Indicate that the session started 2 hours ago and no user activity has |
| 2879 // occurred yet. | 2878 // occurred yet. |
| 2880 g_browser_process->local_state()->SetInt64( | 2879 g_browser_process->local_state()->SetInt64( |
| 2881 prefs::kSessionStartTime, | 2880 prefs::kSessionStartTime, |
| 2882 (base::TimeTicks::Now() - base::TimeDelta::FromHours(2)) | 2881 (base::TimeTicks::Now() - base::TimeDelta::FromHours(2)) |
| 2883 .ToInternalValue()); | 2882 .ToInternalValue()); |
| 2884 } | 2883 } |
| 2885 | 2884 |
| 2886 // Disabled, see http://crbug.com/315308. | 2885 IN_PROC_BROWSER_TEST_F(PolicyTest, SessionLengthLimit) { |
| 2887 IN_PROC_BROWSER_TEST_F(PolicyTest, DISABLED_SessionLengthLimit) { | |
| 2888 content::MockNotificationObserver observer; | 2886 content::MockNotificationObserver observer; |
| 2889 content::NotificationRegistrar registrar; | 2887 content::NotificationRegistrar registrar; |
| 2890 registrar.Add(&observer, | 2888 registrar.Add(&observer, |
| 2891 chrome::NOTIFICATION_APP_TERMINATING, | 2889 chrome::NOTIFICATION_APP_TERMINATING, |
| 2892 content::NotificationService::AllSources()); | 2890 content::NotificationService::AllSources()); |
| 2893 | 2891 |
| 2894 // Set the session length limit to 3 hours. Verify that the session is not | 2892 // Set the session length limit to 3 hours. Verify that the session is not |
| 2895 // terminated. | 2893 // terminated. |
| 2896 EXPECT_CALL(observer, Observe(chrome::NOTIFICATION_APP_TERMINATING, _, _)) | 2894 EXPECT_CALL(observer, Observe(chrome::NOTIFICATION_APP_TERMINATING, _, _)) |
| 2897 .Times(0); | 2895 .Times(0); |
| (...skipping 1096 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3994 POLICY_SCOPE_USER, | 3992 POLICY_SCOPE_USER, |
| 3995 POLICY_SOURCE_CLOUD, | 3993 POLICY_SOURCE_CLOUD, |
| 3996 new base::FundamentalValue(false), | 3994 new base::FundamentalValue(false), |
| 3997 NULL); | 3995 NULL); |
| 3998 UpdateProviderPolicy(policies); | 3996 UpdateProviderPolicy(policies); |
| 3999 EXPECT_FALSE(display_manager->unified_desktop_enabled()); | 3997 EXPECT_FALSE(display_manager->unified_desktop_enabled()); |
| 4000 } | 3998 } |
| 4001 #endif // defined(OS_CHROMEOS) | 3999 #endif // defined(OS_CHROMEOS) |
| 4002 | 4000 |
| 4003 } // namespace policy | 4001 } // namespace policy |
| OLD | NEW |