Chromium Code Reviews| OLD | NEW |
|---|---|
| 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/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/files/file_path.h" | 8 #include "base/files/file_path.h" |
| 9 #include "base/memory/scoped_vector.h" | 9 #include "base/memory/scoped_vector.h" |
| 10 #include "base/message_loop.h" | 10 #include "base/message_loop.h" |
| 11 #include "base/pickle.h" | 11 #include "base/pickle.h" |
| 12 #include "base/process_util.h" | 12 #include "base/process_util.h" |
| 13 #include "base/string_number_conversions.h" | 13 #include "base/string_number_conversions.h" |
| 14 #include "base/strings/string_split.h" | 14 #include "base/strings/string_split.h" |
| 15 #include "content/browser/browser_thread_impl.h" | 15 #include "content/browser/browser_thread_impl.h" |
| 16 #include "content/browser/child_process_security_policy_impl.h" | 16 #include "content/browser/child_process_security_policy_impl.h" |
| 17 #include "content/browser/loader/resource_dispatcher_host_impl.h" | 17 #include "content/browser/loader/resource_dispatcher_host_impl.h" |
| 18 #include "content/browser/loader/resource_message_filter.h" | 18 #include "content/browser/loader/resource_message_filter.h" |
| 19 #include "content/browser/worker_host/worker_service_impl.h" | |
| 19 #include "content/common/child_process_host_impl.h" | 20 #include "content/common/child_process_host_impl.h" |
| 20 #include "content/common/resource_messages.h" | 21 #include "content/common/resource_messages.h" |
| 21 #include "content/common/view_messages.h" | 22 #include "content/common/view_messages.h" |
| 22 #include "content/public/browser/global_request_id.h" | 23 #include "content/public/browser/global_request_id.h" |
| 23 #include "content/public/browser/resource_context.h" | 24 #include "content/public/browser/resource_context.h" |
| 24 #include "content/public/browser/resource_dispatcher_host_delegate.h" | 25 #include "content/public/browser/resource_dispatcher_host_delegate.h" |
| 25 #include "content/public/browser/resource_throttle.h" | 26 #include "content/public/browser/resource_throttle.h" |
| 26 #include "content/public/common/process_type.h" | 27 #include "content/public/common/process_type.h" |
| 27 #include "content/public/common/resource_response.h" | 28 #include "content/public/common/resource_response.h" |
| 28 #include "content/public/test/test_browser_context.h" | 29 #include "content/public/test/test_browser_context.h" |
| (...skipping 555 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 584 test_fixture_ = NULL; | 585 test_fixture_ = NULL; |
| 585 | 586 |
| 586 host_.Shutdown(); | 587 host_.Shutdown(); |
| 587 | 588 |
| 588 ChildProcessSecurityPolicyImpl::GetInstance()->Remove(0); | 589 ChildProcessSecurityPolicyImpl::GetInstance()->Remove(0); |
| 589 | 590 |
| 590 // Flush the message loop to make application verifiers happy. | 591 // Flush the message loop to make application verifiers happy. |
| 591 if (ResourceDispatcherHostImpl::Get()) | 592 if (ResourceDispatcherHostImpl::Get()) |
| 592 ResourceDispatcherHostImpl::Get()->CancelRequestsForContext( | 593 ResourceDispatcherHostImpl::Get()->CancelRequestsForContext( |
| 593 browser_context_->GetResourceContext()); | 594 browser_context_->GetResourceContext()); |
| 595 | |
| 596 WorkerServiceImpl::GetInstance()->PerformUnitTestTeardown(); | |
|
darin (slow to review)
2013/05/24 20:48:40
another approach might have been to register a Mes
shatch
2013/05/28 17:52:13
Didn't know about those, do you mind if I try that
| |
| 597 | |
| 594 browser_context_.reset(); | 598 browser_context_.reset(); |
| 595 message_loop_.RunUntilIdle(); | 599 message_loop_.RunUntilIdle(); |
| 596 } | 600 } |
| 597 | 601 |
| 598 // Creates a request using the current test object as the filter. | 602 // Creates a request using the current test object as the filter. |
| 599 void MakeTestRequest(int render_view_id, | 603 void MakeTestRequest(int render_view_id, |
| 600 int request_id, | 604 int request_id, |
| 601 const GURL& url); | 605 const GURL& url); |
| 602 | 606 |
| 603 // Generates a request using the given filter. This will probably be a | 607 // Generates a request using the given filter. This will probably be a |
| (...skipping 1334 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1938 } | 1942 } |
| 1939 | 1943 |
| 1940 base::MessageLoop::current()->RunUntilIdle(); | 1944 base::MessageLoop::current()->RunUntilIdle(); |
| 1941 | 1945 |
| 1942 msgs.clear(); | 1946 msgs.clear(); |
| 1943 accum_.GetClassifiedMessages(&msgs); | 1947 accum_.GetClassifiedMessages(&msgs); |
| 1944 } | 1948 } |
| 1945 } | 1949 } |
| 1946 | 1950 |
| 1947 } // namespace content | 1951 } // namespace content |
| OLD | NEW |