Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(481)

Side by Side Diff: content/browser/service_worker/service_worker_dispatcher_host_unittest.cc

Issue 2703343002: ServiceWorker: Use mojo's data pipe for respondWith(stream) (Closed)
Patch Set: Addressed comments from kinuko and haraken Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698