| 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 // This file tests the chrome.alarms extension API. |    5 // This file tests the chrome.alarms extension API. | 
|    6  |    6  | 
|    7 #include "base/test/simple_test_clock.h" |    7 #include "base/test/simple_test_clock.h" | 
|    8 #include "base/values.h" |    8 #include "base/values.h" | 
|    9 #include "chrome/browser/extensions/api/alarms/alarm_manager.h" |    9 #include "chrome/browser/extensions/api/alarms/alarm_manager.h" | 
|   10 #include "chrome/browser/extensions/api/alarms/alarms_api.h" |   10 #include "chrome/browser/extensions/api/alarms/alarms_api.h" | 
|   11 #include "chrome/browser/extensions/extension_api_unittest.h" |   11 #include "chrome/browser/extensions/extension_api_unittest.h" | 
|   12 #include "chrome/browser/extensions/extension_function_test_utils.h" |   12 #include "chrome/browser/extensions/extension_function_test_utils.h" | 
|   13 #include "chrome/browser/profiles/profile_manager.h" |   13 #include "chrome/browser/profiles/profile_manager.h" | 
|   14 #include "chrome/browser/ui/browser.h" |   14 #include "chrome/browser/ui/browser.h" | 
|   15 #include "chrome/common/extensions/extension_messages.h" |  | 
|   16 #include "content/public/browser/web_contents.h" |   15 #include "content/public/browser/web_contents.h" | 
|   17 #include "content/public/test/mock_render_process_host.h" |   16 #include "content/public/test/mock_render_process_host.h" | 
 |   17 #include "extensions/common/extension_messages.h" | 
|   18 #include "ipc/ipc_test_sink.h" |   18 #include "ipc/ipc_test_sink.h" | 
|   19 #include "testing/gmock/include/gmock/gmock.h" |   19 #include "testing/gmock/include/gmock/gmock.h" | 
|   20 #include "testing/gtest/include/gtest/gtest.h" |   20 #include "testing/gtest/include/gtest/gtest.h" | 
|   21  |   21  | 
|   22 typedef extensions::api::alarms::Alarm JsAlarm; |   22 typedef extensions::api::alarms::Alarm JsAlarm; | 
|   23  |   23  | 
|   24 namespace utils = extension_function_test_utils; |   24 namespace utils = extension_function_test_utils; | 
|   25  |   25  | 
|   26 namespace extensions { |   26 namespace extensions { | 
|   27  |   27  | 
| (...skipping 613 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  641  |  641  | 
|  642   // The next poll should be the first poll that hasn't happened and is in-line |  642   // The next poll should be the first poll that hasn't happened and is in-line | 
|  643   // with the original scheduling. |  643   // with the original scheduling. | 
|  644   // Last poll was at 380 seconds; next poll should be at 480 seconds. |  644   // Last poll was at 380 seconds; next poll should be at 480 seconds. | 
|  645   EXPECT_DOUBLE_EQ((alarm_manager_->last_poll_time_ + |  645   EXPECT_DOUBLE_EQ((alarm_manager_->last_poll_time_ + | 
|  646                        base::TimeDelta::FromSeconds(100)).ToJsTime(), |  646                        base::TimeDelta::FromSeconds(100)).ToJsTime(), | 
|  647                    alarm_manager_->next_poll_time_.ToJsTime()); |  647                    alarm_manager_->next_poll_time_.ToJsTime()); | 
|  648 } |  648 } | 
|  649  |  649  | 
|  650 }  // namespace extensions |  650 }  // namespace extensions | 
| OLD | NEW |