| 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 812 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 823 | 823 |
| 824 // Set the worker status to STOPPING. | 824 // Set the worker status to STOPPING. |
| 825 version_->embedded_worker()->Stop(); | 825 version_->embedded_worker()->Stop(); |
| 826 EXPECT_EQ(EmbeddedWorkerStatus::STOPPING, version_->running_status()); | 826 EXPECT_EQ(EmbeddedWorkerStatus::STOPPING, version_->running_status()); |
| 827 | 827 |
| 828 // Receive a response for a timed out request. The bad message count should | 828 // Receive a response for a timed out request. The bad message count should |
| 829 // not increase. | 829 // not increase. |
| 830 const int kFetchEventId = 91; // Dummy value | 830 const int kFetchEventId = 91; // Dummy value |
| 831 dispatcher_host_->OnMessageReceived(ServiceWorkerHostMsg_FetchEventResponse( | 831 dispatcher_host_->OnMessageReceived(ServiceWorkerHostMsg_FetchEventResponse( |
| 832 version_->embedded_worker()->embedded_worker_id(), kFetchEventId, | 832 version_->embedded_worker()->embedded_worker_id(), kFetchEventId, |
| 833 SERVICE_WORKER_FETCH_EVENT_RESULT_FALLBACK, ServiceWorkerResponse(), | 833 ServiceWorkerResponse(), base::Time::Now())); |
| 834 base::Time::Now())); | |
| 835 | 834 |
| 836 base::RunLoop().RunUntilIdle(); | 835 base::RunLoop().RunUntilIdle(); |
| 837 EXPECT_EQ(0, dispatcher_host_->bad_messages_received_count_); | 836 EXPECT_EQ(0, dispatcher_host_->bad_messages_received_count_); |
| 838 } | 837 } |
| 839 | 838 |
| 840 } // namespace content | 839 } // namespace content |
| OLD | NEW |