| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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/system/automatic_reboot_manager.h" | 5 #include "chrome/browser/chromeos/system/automatic_reboot_manager.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "ash/shell.h" | 10 #include "ash/shell.h" |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 std::vector<std::pair<base::TimeTicks, base::Closure> >, | 97 std::vector<std::pair<base::TimeTicks, base::Closure> >, |
| 98 TemporalOrder> tasks_; | 98 TemporalOrder> tasks_; |
| 99 | 99 |
| 100 DISALLOW_COPY_AND_ASSIGN(MockTimeSingleThreadTaskRunner); | 100 DISALLOW_COPY_AND_ASSIGN(MockTimeSingleThreadTaskRunner); |
| 101 }; | 101 }; |
| 102 | 102 |
| 103 class MockTimeTickClock : public base::TickClock { | 103 class MockTimeTickClock : public base::TickClock { |
| 104 public: | 104 public: |
| 105 explicit MockTimeTickClock( | 105 explicit MockTimeTickClock( |
| 106 scoped_refptr<MockTimeSingleThreadTaskRunner> task_runner); | 106 scoped_refptr<MockTimeSingleThreadTaskRunner> task_runner); |
| 107 virtual ~MockTimeTickClock(); | |
| 108 | 107 |
| 109 // base::TickClock: | 108 // base::TickClock: |
| 110 virtual base::TimeTicks NowTicks() override; | 109 virtual base::TimeTicks NowTicks() override; |
| 111 | 110 |
| 112 private: | 111 private: |
| 112 virtual ~MockTimeTickClock(); |
| 113 |
| 113 scoped_refptr<MockTimeSingleThreadTaskRunner> task_runner_; | 114 scoped_refptr<MockTimeSingleThreadTaskRunner> task_runner_; |
| 114 | 115 |
| 115 DISALLOW_COPY_AND_ASSIGN(MockTimeTickClock); | 116 DISALLOW_COPY_AND_ASSIGN(MockTimeTickClock); |
| 116 }; | 117 }; |
| 117 | 118 |
| 118 } // namespace | 119 } // namespace |
| 119 | 120 |
| 120 class AutomaticRebootManagerBasicTest : public testing::Test { | 121 class AutomaticRebootManagerBasicTest : public testing::Test { |
| 121 protected: | 122 protected: |
| 122 typedef base::OneShotTimer<AutomaticRebootManager> Timer; | 123 typedef base::OneShotTimer<AutomaticRebootManager> Timer; |
| (...skipping 1929 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2052 INSTANTIATE_TEST_CASE_P( | 2053 INSTANTIATE_TEST_CASE_P( |
| 2053 AutomaticRebootManagerTestInstance, | 2054 AutomaticRebootManagerTestInstance, |
| 2054 AutomaticRebootManagerTest, | 2055 AutomaticRebootManagerTest, |
| 2055 ::testing::Values( | 2056 ::testing::Values( |
| 2056 AUTOMATIC_REBOOT_MANAGER_TEST_SCENARIO_LOGIN_SCREEN, | 2057 AUTOMATIC_REBOOT_MANAGER_TEST_SCENARIO_LOGIN_SCREEN, |
| 2057 AUTOMATIC_REBOOT_MANAGER_TEST_SCENARIO_KIOSK_APP_SESSION, | 2058 AUTOMATIC_REBOOT_MANAGER_TEST_SCENARIO_KIOSK_APP_SESSION, |
| 2058 AUTOMATIC_REBOOT_MANAGER_TEST_SCENARIO_NON_KIOSK_APP_SESSION)); | 2059 AUTOMATIC_REBOOT_MANAGER_TEST_SCENARIO_NON_KIOSK_APP_SESSION)); |
| 2059 | 2060 |
| 2060 } // namespace system | 2061 } // namespace system |
| 2061 } // namespace chromeos | 2062 } // namespace chromeos |
| OLD | NEW |