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

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: Used TEST_P to test closing the connection first and On{Aborted,Completed} first 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 812 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698