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 "chrome/browser/chromeos/session_length_limiter.h" | 5 #include "chrome/browser/chromeos/session_length_limiter.h" |
6 | 6 |
7 #include "base/compiler_specific.h" | 7 #include "base/compiler_specific.h" |
8 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "base/prefs/testing_pref_service.h" | |
11 #include "base/strings/string_number_conversions.h" | 10 #include "base/strings/string_number_conversions.h" |
12 #include "base/test/test_mock_time_task_runner.h" | 11 #include "base/test/test_mock_time_task_runner.h" |
13 #include "base/thread_task_runner_handle.h" | 12 #include "base/thread_task_runner_handle.h" |
14 #include "base/values.h" | 13 #include "base/values.h" |
15 #include "chrome/common/pref_names.h" | 14 #include "chrome/common/pref_names.h" |
16 #include "chrome/test/base/testing_browser_process.h" | 15 #include "chrome/test/base/testing_browser_process.h" |
| 16 #include "components/prefs/testing_pref_service.h" |
17 #include "testing/gmock/include/gmock/gmock.h" | 17 #include "testing/gmock/include/gmock/gmock.h" |
18 #include "testing/gtest/include/gtest/gtest.h" | 18 #include "testing/gtest/include/gtest/gtest.h" |
19 | 19 |
20 using ::testing::Invoke; | 20 using ::testing::Invoke; |
21 using ::testing::Mock; | 21 using ::testing::Mock; |
22 using ::testing::NiceMock; | 22 using ::testing::NiceMock; |
23 | 23 |
24 namespace chromeos { | 24 namespace chromeos { |
25 | 25 |
26 namespace { | 26 namespace { |
(...skipping 704 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
731 runner_->FastForwardBy(base::TimeDelta::FromSeconds(50)); | 731 runner_->FastForwardBy(base::TimeDelta::FromSeconds(50)); |
732 | 732 |
733 // Remove the session length limit. | 733 // Remove the session length limit. |
734 ClearSessionLengthLimitPref(); | 734 ClearSessionLengthLimitPref(); |
735 | 735 |
736 // Verify that no timer fires to terminate the session. | 736 // Verify that no timer fires to terminate the session. |
737 runner_->FastForwardUntilNoTasksRemain(); | 737 runner_->FastForwardUntilNoTasksRemain(); |
738 } | 738 } |
739 | 739 |
740 } // namespace chromeos | 740 } // namespace chromeos |
OLD | NEW |