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

Side by Side Diff: content/browser/loader/resource_dispatcher_host_unittest.cc

Issue 411283002: Remove disable-embedded-shared-worker flag and shared worker process related codes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 6 years, 5 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 <vector> 5 #include <vector>
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/file_util.h" 9 #include "base/file_util.h"
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
11 #include "base/memory/scoped_vector.h" 11 #include "base/memory/scoped_vector.h"
12 #include "base/memory/shared_memory.h" 12 #include "base/memory/shared_memory.h"
13 #include "base/message_loop/message_loop.h" 13 #include "base/message_loop/message_loop.h"
14 #include "base/pickle.h" 14 #include "base/pickle.h"
15 #include "base/run_loop.h" 15 #include "base/run_loop.h"
16 #include "base/strings/string_number_conversions.h" 16 #include "base/strings/string_number_conversions.h"
17 #include "base/strings/string_split.h" 17 #include "base/strings/string_split.h"
18 #include "content/browser/browser_thread_impl.h" 18 #include "content/browser/browser_thread_impl.h"
19 #include "content/browser/child_process_security_policy_impl.h" 19 #include "content/browser/child_process_security_policy_impl.h"
20 #include "content/browser/loader/cross_site_resource_handler.h" 20 #include "content/browser/loader/cross_site_resource_handler.h"
21 #include "content/browser/loader/detachable_resource_handler.h" 21 #include "content/browser/loader/detachable_resource_handler.h"
22 #include "content/browser/loader/resource_dispatcher_host_impl.h" 22 #include "content/browser/loader/resource_dispatcher_host_impl.h"
23 #include "content/browser/loader/resource_loader.h" 23 #include "content/browser/loader/resource_loader.h"
24 #include "content/browser/loader/resource_message_filter.h" 24 #include "content/browser/loader/resource_message_filter.h"
25 #include "content/browser/loader/resource_request_info_impl.h" 25 #include "content/browser/loader/resource_request_info_impl.h"
26 #include "content/browser/worker_host/worker_service_impl.h"
27 #include "content/common/appcache_interfaces.h" 26 #include "content/common/appcache_interfaces.h"
28 #include "content/common/child_process_host_impl.h" 27 #include "content/common/child_process_host_impl.h"
29 #include "content/common/resource_messages.h" 28 #include "content/common/resource_messages.h"
30 #include "content/common/view_messages.h" 29 #include "content/common/view_messages.h"
31 #include "content/public/browser/global_request_id.h" 30 #include "content/public/browser/global_request_id.h"
32 #include "content/public/browser/resource_context.h" 31 #include "content/public/browser/resource_context.h"
33 #include "content/public/browser/resource_dispatcher_host_delegate.h" 32 #include "content/public/browser/resource_dispatcher_host_delegate.h"
34 #include "content/public/browser/resource_request_info.h" 33 #include "content/public/browser/resource_request_info.h"
35 #include "content/public/browser/resource_throttle.h" 34 #include "content/public/browser/resource_throttle.h"
36 #include "content/public/common/process_type.h" 35 #include "content/public/common/process_type.h"
(...skipping 734 matching lines...) Expand 10 before | Expand all | Expand 10 after
771 770
772 host_.Shutdown(); 771 host_.Shutdown();
773 772
774 ChildProcessSecurityPolicyImpl::GetInstance()->Remove(0); 773 ChildProcessSecurityPolicyImpl::GetInstance()->Remove(0);
775 774
776 // Flush the message loop to make application verifiers happy. 775 // Flush the message loop to make application verifiers happy.
777 if (ResourceDispatcherHostImpl::Get()) 776 if (ResourceDispatcherHostImpl::Get())
778 ResourceDispatcherHostImpl::Get()->CancelRequestsForContext( 777 ResourceDispatcherHostImpl::Get()->CancelRequestsForContext(
779 browser_context_->GetResourceContext()); 778 browser_context_->GetResourceContext());
780 779
781 WorkerServiceImpl::GetInstance()->PerformTeardownForTesting();
782
783 browser_context_.reset(); 780 browser_context_.reset();
784 base::RunLoop().RunUntilIdle(); 781 base::RunLoop().RunUntilIdle();
785 } 782 }
786 783
787 // Creates a new ForwardingFilter and registers it with |child_ids_| so as not 784 // Creates a new ForwardingFilter and registers it with |child_ids_| so as not
788 // to leak per-child state on test shutdown. 785 // to leak per-child state on test shutdown.
789 ForwardingFilter* MakeForwardingFilter() { 786 ForwardingFilter* MakeForwardingFilter() {
790 ForwardingFilter* filter = 787 ForwardingFilter* filter =
791 new ForwardingFilter(this, browser_context_->GetResourceContext()); 788 new ForwardingFilter(this, browser_context_->GetResourceContext());
792 child_ids_.insert(filter->child_id()); 789 child_ids_.insert(filter->child_id());
(...skipping 2128 matching lines...) Expand 10 before | Expand all | Expand 10 after
2921 } else { 2918 } else {
2922 return new net::URLRequestTestJob( 2919 return new net::URLRequestTestJob(
2923 request, network_delegate, 2920 request, network_delegate,
2924 test_fixture_->response_headers_, test_fixture_->response_data_, 2921 test_fixture_->response_headers_, test_fixture_->response_data_,
2925 false); 2922 false);
2926 } 2923 }
2927 } 2924 }
2928 } 2925 }
2929 2926
2930 } // namespace content 2927 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/loader/resource_dispatcher_host_impl.cc ('k') | content/browser/loader/resource_request_info_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698