| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 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 "content/browser/service_worker/service_worker_dispatcher_host.h" | 5 #include "content/browser/service_worker/service_worker_dispatcher_host.h" |
| 6 | 6 |
| 7 #include <stdint.h> | 7 #include <stdint.h> |
| 8 | 8 |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 815 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 826 | 826 |
| 827 // Set the worker status to STOPPING. | 827 // Set the worker status to STOPPING. |
| 828 version_->embedded_worker()->Stop(); | 828 version_->embedded_worker()->Stop(); |
| 829 EXPECT_EQ(EmbeddedWorkerStatus::STOPPING, version_->running_status()); | 829 EXPECT_EQ(EmbeddedWorkerStatus::STOPPING, version_->running_status()); |
| 830 | 830 |
| 831 // Receive a response for a timed out request. The bad message count should | 831 // Receive a response for a timed out request. The bad message count should |
| 832 // not increase. | 832 // not increase. |
| 833 const int kFetchEventId = 91; // Dummy value | 833 const int kFetchEventId = 91; // Dummy value |
| 834 dispatcher_host_->OnMessageReceived(ServiceWorkerHostMsg_FetchEventResponse( | 834 dispatcher_host_->OnMessageReceived(ServiceWorkerHostMsg_FetchEventResponse( |
| 835 version_->embedded_worker()->embedded_worker_id(), kFetchEventId, | 835 version_->embedded_worker()->embedded_worker_id(), kFetchEventId, |
| 836 SERVICE_WORKER_FETCH_EVENT_RESULT_FALLBACK, ServiceWorkerResponse(), | 836 ServiceWorkerResponse(), base::Time::Now())); |
| 837 base::Time::Now())); | |
| 838 | 837 |
| 839 base::RunLoop().RunUntilIdle(); | 838 base::RunLoop().RunUntilIdle(); |
| 840 EXPECT_EQ(0, dispatcher_host_->bad_messages_received_count_); | 839 EXPECT_EQ(0, dispatcher_host_->bad_messages_received_count_); |
| 841 } | 840 } |
| 842 | 841 |
| 843 } // namespace content | 842 } // namespace content |
| OLD | NEW |