OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "chrome/browser/chromeos/policy/recommendation_restorer.h" | 5 #include "chrome/browser/chromeos/policy/recommendation_restorer.h" |
6 | 6 |
7 #include "ash/magnifier/magnifier_constants.h" | 7 #include "ash/magnifier/magnifier_constants.h" |
8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "base/prefs/pref_notifier_impl.h" | 9 #include "base/prefs/pref_notifier_impl.h" |
10 #include "base/prefs/testing_pref_store.h" | 10 #include "base/prefs/testing_pref_store.h" |
11 #include "base/strings/utf_string_conversions.h" | 11 #include "base/strings/utf_string_conversions.h" |
12 #include "base/test/test_simple_task_runner.h" | 12 #include "base/test/test_simple_task_runner.h" |
13 #include "base/thread_task_runner_handle.h" | 13 #include "base/thread_task_runner_handle.h" |
14 #include "base/time/time.h" | 14 #include "base/time/time.h" |
15 #include "base/values.h" | 15 #include "base/values.h" |
16 #include "chrome/browser/chrome_notification_types.h" | 16 #include "chrome/browser/chrome_notification_types.h" |
17 #include "chrome/browser/chromeos/policy/recommendation_restorer_factory.h" | 17 #include "chrome/browser/chromeos/policy/recommendation_restorer_factory.h" |
18 #include "chrome/browser/prefs/browser_prefs.h" | 18 #include "chrome/browser/prefs/browser_prefs.h" |
19 #include "chrome/browser/prefs/pref_service_syncable.h" | 19 #include "chrome/browser/prefs/pref_service_syncable.h" |
20 #include "chrome/common/chrome_constants.h" | 20 #include "chrome/common/chrome_constants.h" |
21 #include "chrome/common/pref_names.h" | 21 #include "chrome/common/pref_names.h" |
22 #include "chrome/test/base/testing_browser_process.h" | 22 #include "chrome/test/base/testing_browser_process.h" |
23 #include "chrome/test/base/testing_pref_service_syncable.h" | 23 #include "chrome/test/base/testing_pref_service_syncable.h" |
24 #include "chrome/test/base/testing_profile.h" | 24 #include "chrome/test/base/testing_profile.h" |
25 #include "chrome/test/base/testing_profile_manager.h" | 25 #include "chrome/test/base/testing_profile_manager.h" |
26 #include "components/user_prefs/pref_registry_syncable.h" | 26 #include "components/pref_registry/pref_registry_syncable.h" |
27 #include "content/public/browser/notification_details.h" | 27 #include "content/public/browser/notification_details.h" |
28 #include "content/public/browser/notification_service.h" | 28 #include "content/public/browser/notification_service.h" |
29 #include "content/public/browser/notification_source.h" | 29 #include "content/public/browser/notification_source.h" |
30 #include "testing/gtest/include/gtest/gtest.h" | 30 #include "testing/gtest/include/gtest/gtest.h" |
31 | 31 |
32 namespace policy { | 32 namespace policy { |
33 | 33 |
34 namespace { | 34 namespace { |
35 // The amount of idle time after which recommended values are restored. | 35 // The amount of idle time after which recommended values are restored. |
36 const int kRestoreDelayInMs = 60 * 1000; // 1 minute. | 36 const int kRestoreDelayInMs = 60 * 1000; // 1 minute. |
(...skipping 496 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
533 | 533 |
534 // Fast forward until the reset timer fires. | 534 // Fast forward until the reset timer fires. |
535 VerifyTimerIsRunning(); | 535 VerifyTimerIsRunning(); |
536 runner_->RunUntilIdle(); | 536 runner_->RunUntilIdle(); |
537 VerifyPrefFollowsRecommendation(prefs::kLargeCursorEnabled, | 537 VerifyPrefFollowsRecommendation(prefs::kLargeCursorEnabled, |
538 base::FundamentalValue(false)); | 538 base::FundamentalValue(false)); |
539 VerifyTimerIsStopped(); | 539 VerifyTimerIsStopped(); |
540 } | 540 } |
541 | 541 |
542 } // namespace policy | 542 } // namespace policy |
OLD | NEW |