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