| 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 "base/command_line.h" | 5 #include "base/command_line.h" |
| 6 #include "base/compiler_specific.h" | 6 #include "base/compiler_specific.h" |
| 7 #include "base/memory/scoped_vector.h" | 7 #include "base/memory/scoped_vector.h" |
| 8 #include "base/strings/string16.h" | 8 #include "base/strings/string16.h" |
| 9 #include "content/browser/browser_thread_impl.h" | 9 #include "content/browser/browser_thread_impl.h" |
| 10 #include "content/browser/browsing_instance.h" | 10 #include "content/browser/browsing_instance.h" |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 SiteInstanceTest() | 68 SiteInstanceTest() |
| 69 : ui_thread_(BrowserThread::UI, &message_loop_), | 69 : ui_thread_(BrowserThread::UI, &message_loop_), |
| 70 file_user_blocking_thread_(BrowserThread::FILE_USER_BLOCKING, | 70 file_user_blocking_thread_(BrowserThread::FILE_USER_BLOCKING, |
| 71 &message_loop_), | 71 &message_loop_), |
| 72 io_thread_(BrowserThread::IO, &message_loop_), | 72 io_thread_(BrowserThread::IO, &message_loop_), |
| 73 old_browser_client_(NULL) { | 73 old_browser_client_(NULL) { |
| 74 } | 74 } |
| 75 | 75 |
| 76 void SetUp() override { | 76 void SetUp() override { |
| 77 old_browser_client_ = SetBrowserClientForTesting(&browser_client_); | 77 old_browser_client_ = SetBrowserClientForTesting(&browser_client_); |
| 78 url::AddStandardScheme(kPrivilegedScheme, url::SCHEME_WITHOUT_PORT); | 78 url::AddStandardScheme(kPrivilegedScheme); |
| 79 url::AddStandardScheme(kChromeUIScheme, url::SCHEME_WITHOUT_PORT); | 79 url::AddStandardScheme(kChromeUIScheme); |
| 80 | 80 |
| 81 SiteInstanceImpl::set_render_process_host_factory(&rph_factory_); | 81 SiteInstanceImpl::set_render_process_host_factory(&rph_factory_); |
| 82 } | 82 } |
| 83 | 83 |
| 84 void TearDown() override { | 84 void TearDown() override { |
| 85 // Ensure that no RenderProcessHosts are left over after the tests. | 85 // Ensure that no RenderProcessHosts are left over after the tests. |
| 86 EXPECT_TRUE(RenderProcessHost::AllHostsIterator().IsAtEnd()); | 86 EXPECT_TRUE(RenderProcessHost::AllHostsIterator().IsAtEnd()); |
| 87 | 87 |
| 88 SetBrowserClientForTesting(old_browser_client_); | 88 SetBrowserClientForTesting(old_browser_client_); |
| 89 SiteInstanceImpl::set_render_process_host_factory(NULL); | 89 SiteInstanceImpl::set_render_process_host_factory(NULL); |
| (...skipping 686 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 776 EXPECT_TRUE(instance->GetSiteURL().is_empty()); | 776 EXPECT_TRUE(instance->GetSiteURL().is_empty()); |
| 777 host.reset(instance->GetProcess()); | 777 host.reset(instance->GetProcess()); |
| 778 | 778 |
| 779 EXPECT_FALSE(RenderProcessHostImpl::GetProcessHostForSite( | 779 EXPECT_FALSE(RenderProcessHostImpl::GetProcessHostForSite( |
| 780 browser_context.get(), GURL())); | 780 browser_context.get(), GURL())); |
| 781 | 781 |
| 782 DrainMessageLoops(); | 782 DrainMessageLoops(); |
| 783 } | 783 } |
| 784 | 784 |
| 785 } // namespace content | 785 } // namespace content |
| OLD | NEW |