| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/basictypes.h" | 5 #include "base/basictypes.h" |
| 6 #include "base/run_loop.h" | 6 #include "base/run_loop.h" |
| 7 #include "content/browser/message_port_service.h" | 7 #include "content/browser/message_port_service.h" |
| 8 #include "content/browser/service_worker/embedded_worker_registry.h" | 8 #include "content/browser/service_worker/embedded_worker_registry.h" |
| 9 #include "content/browser/service_worker/embedded_worker_test_helper.h" | 9 #include "content/browser/service_worker/embedded_worker_test_helper.h" |
| 10 #include "content/browser/service_worker/service_worker_context_core.h" | 10 #include "content/browser/service_worker/service_worker_context_core.h" |
| 11 #include "content/browser/service_worker/service_worker_registration.h" | 11 #include "content/browser/service_worker/service_worker_registration.h" |
| 12 #include "content/browser/service_worker/service_worker_test_utils.h" | 12 #include "content/browser/service_worker/service_worker_test_utils.h" |
| 13 #include "content/browser/service_worker/service_worker_utils.h" | |
| 14 #include "content/browser/service_worker/service_worker_version.h" | 13 #include "content/browser/service_worker/service_worker_version.h" |
| 14 #include "content/common/service_worker/service_worker_utils.h" |
| 15 #include "content/public/test/test_browser_thread_bundle.h" | 15 #include "content/public/test/test_browser_thread_bundle.h" |
| 16 #include "testing/gtest/include/gtest/gtest.h" | 16 #include "testing/gtest/include/gtest/gtest.h" |
| 17 | 17 |
| 18 // IPC messages for testing --------------------------------------------------- | 18 // IPC messages for testing --------------------------------------------------- |
| 19 | 19 |
| 20 #define IPC_MESSAGE_IMPL | 20 #define IPC_MESSAGE_IMPL |
| 21 #include "ipc/ipc_message_macros.h" | 21 #include "ipc/ipc_message_macros.h" |
| 22 | 22 |
| 23 #define IPC_MESSAGE_START TestMsgStart | 23 #define IPC_MESSAGE_START TestMsgStart |
| 24 | 24 |
| (...skipping 716 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 741 base::TimeTicks::Now() - | 741 base::TimeTicks::Now() - |
| 742 base::TimeDelta::FromMinutes( | 742 base::TimeDelta::FromMinutes( |
| 743 ServiceWorkerVersion::kStartWorkerTimeoutMinutes + 1); | 743 ServiceWorkerVersion::kStartWorkerTimeoutMinutes + 1); |
| 744 version_->timeout_timer_.user_task().Run(); | 744 version_->timeout_timer_.user_task().Run(); |
| 745 base::RunLoop().RunUntilIdle(); | 745 base::RunLoop().RunUntilIdle(); |
| 746 EXPECT_EQ(SERVICE_WORKER_ERROR_TIMEOUT, status); | 746 EXPECT_EQ(SERVICE_WORKER_ERROR_TIMEOUT, status); |
| 747 EXPECT_EQ(ServiceWorkerVersion::STOPPED, version_->running_status()); | 747 EXPECT_EQ(ServiceWorkerVersion::STOPPED, version_->running_status()); |
| 748 } | 748 } |
| 749 | 749 |
| 750 } // namespace content | 750 } // namespace content |
| OLD | NEW |