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 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
85 SiteInstanceTest() | 85 SiteInstanceTest() |
86 : ui_thread_(BrowserThread::UI, &message_loop_), | 86 : ui_thread_(BrowserThread::UI, &message_loop_), |
87 file_user_blocking_thread_(BrowserThread::FILE_USER_BLOCKING, | 87 file_user_blocking_thread_(BrowserThread::FILE_USER_BLOCKING, |
88 &message_loop_), | 88 &message_loop_), |
89 io_thread_(BrowserThread::IO, &message_loop_), | 89 io_thread_(BrowserThread::IO, &message_loop_), |
90 old_browser_client_(NULL) { | 90 old_browser_client_(NULL) { |
91 } | 91 } |
92 | 92 |
93 virtual void SetUp() { | 93 virtual void SetUp() { |
94 old_browser_client_ = SetBrowserClientForTesting(&browser_client_); | 94 old_browser_client_ = SetBrowserClientForTesting(&browser_client_); |
95 url_util::AddStandardScheme(kPrivilegedScheme); | 95 url::AddStandardScheme(kPrivilegedScheme); |
96 url_util::AddStandardScheme(kChromeUIScheme); | 96 url::AddStandardScheme(kChromeUIScheme); |
97 | 97 |
98 SiteInstanceImpl::set_render_process_host_factory(&rph_factory_); | 98 SiteInstanceImpl::set_render_process_host_factory(&rph_factory_); |
99 } | 99 } |
100 | 100 |
101 virtual void TearDown() { | 101 virtual void TearDown() { |
102 // Ensure that no RenderProcessHosts are left over after the tests. | 102 // Ensure that no RenderProcessHosts are left over after the tests. |
103 EXPECT_TRUE(RenderProcessHost::AllHostsIterator().IsAtEnd()); | 103 EXPECT_TRUE(RenderProcessHost::AllHostsIterator().IsAtEnd()); |
104 | 104 |
105 SetBrowserClientForTesting(old_browser_client_); | 105 SetBrowserClientForTesting(old_browser_client_); |
106 SiteInstanceImpl::set_render_process_host_factory(NULL); | 106 SiteInstanceImpl::set_render_process_host_factory(NULL); |
(...skipping 650 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
757 EXPECT_TRUE(instance->GetSiteURL().is_empty()); | 757 EXPECT_TRUE(instance->GetSiteURL().is_empty()); |
758 host.reset(instance->GetProcess()); | 758 host.reset(instance->GetProcess()); |
759 | 759 |
760 EXPECT_FALSE(RenderProcessHostImpl::GetProcessHostForSite( | 760 EXPECT_FALSE(RenderProcessHostImpl::GetProcessHostForSite( |
761 browser_context.get(), GURL())); | 761 browser_context.get(), GURL())); |
762 | 762 |
763 DrainMessageLoops(); | 763 DrainMessageLoops(); |
764 } | 764 } |
765 | 765 |
766 } // namespace content | 766 } // namespace content |
OLD | NEW |