| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 "base/callback_helpers.h" | 5 #include "base/callback_helpers.h" |
| 6 #include "base/memory/ptr_util.h" |
| 6 #include "base/run_loop.h" | 7 #include "base/run_loop.h" |
| 7 #include "components/pref_registry/pref_registry_syncable.h" | 8 #include "components/pref_registry/pref_registry_syncable.h" |
| 8 #include "components/sync_preferences/testing_pref_service_syncable.h" | 9 #include "components/sync_preferences/testing_pref_service_syncable.h" |
| 9 #include "extensions/browser/api/runtime/runtime_api.h" | 10 #include "extensions/browser/api/runtime/runtime_api.h" |
| 10 #include "extensions/browser/api_test_utils.h" | 11 #include "extensions/browser/api_test_utils.h" |
| 11 #include "extensions/browser/api_unittest.h" | 12 #include "extensions/browser/api_unittest.h" |
| 12 #include "extensions/browser/test_extensions_browser_client.h" | 13 #include "extensions/browser/test_extensions_browser_client.h" |
| 13 #include "extensions/browser/test_runtime_api_delegate.h" | 14 #include "extensions/browser/test_runtime_api_delegate.h" |
| 14 #include "extensions/common/manifest.h" | 15 #include "extensions/common/manifest.h" |
| 15 | 16 |
| (...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 238 RunRestartAfterDelayFunction( | 239 RunRestartAfterDelayFunction( |
| 239 "[1]", "Restart was requested too soon. It was throttled instead."); | 240 "[1]", "Restart was requested too soon. It was throttled instead."); |
| 240 ASSERT_TRUE(IsDelayedRestartTimerRunning()); | 241 ASSERT_TRUE(IsDelayedRestartTimerRunning()); |
| 241 // Restart will happen 2 seconds later, even though the request was just one | 242 // Restart will happen 2 seconds later, even though the request was just one |
| 242 // second. | 243 // second. |
| 243 ASSERT_NEAR((desired_restart_time() - last_restart_time).InSecondsF(), | 244 ASSERT_NEAR((desired_restart_time() - last_restart_time).InSecondsF(), |
| 244 base::TimeDelta::FromSeconds(2).InSecondsF(), 0.5); | 245 base::TimeDelta::FromSeconds(2).InSecondsF(), 0.5); |
| 245 } | 246 } |
| 246 | 247 |
| 247 } // namespace extensions | 248 } // namespace extensions |
| OLD | NEW |