OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/test/content_browser_test.h" | 5 #include "content/test/content_browser_test.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/debug/stack_trace.h" | 8 #include "base/debug/stack_trace.h" |
9 #include "base/file_path.h" | 9 #include "base/file_path.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
113 pool.Recycle(); | 113 pool.Recycle(); |
114 #endif | 114 #endif |
115 | 115 |
116 SetUpOnMainThread(); | 116 SetUpOnMainThread(); |
117 | 117 |
118 RunTestOnMainThread(); | 118 RunTestOnMainThread(); |
119 #if defined(OS_MACOSX) | 119 #if defined(OS_MACOSX) |
120 pool.Recycle(); | 120 pool.Recycle(); |
121 #endif | 121 #endif |
122 | 122 |
| 123 for (RenderProcessHost::iterator i(RenderProcessHost::AllHostsIterator()); |
| 124 !i.IsAtEnd(); i.Advance()) { |
| 125 i.GetCurrentValue()->FastShutdownIfPossible(); |
| 126 } |
| 127 |
123 Shell::CloseAllWindows(); | 128 Shell::CloseAllWindows(); |
124 } | 129 } |
125 | 130 |
126 Shell* ContentBrowserTest::CreateBrowser() { | 131 Shell* ContentBrowserTest::CreateBrowser() { |
127 ShellContentBrowserClient* browser_client = | 132 ShellContentBrowserClient* browser_client = |
128 static_cast<ShellContentBrowserClient*>(GetContentClient()->browser()); | 133 static_cast<ShellContentBrowserClient*>(GetContentClient()->browser()); |
129 return Shell::CreateNewWindow( | 134 return Shell::CreateNewWindow( |
130 browser_client->browser_context(), | 135 browser_client->browser_context(), |
131 GURL(chrome::kAboutBlankURL), | 136 GURL(chrome::kAboutBlankURL), |
132 NULL, | 137 NULL, |
133 MSG_ROUTING_NONE, | 138 MSG_ROUTING_NONE, |
134 NULL); | 139 NULL); |
135 } | 140 } |
136 | 141 |
137 Shell* ContentBrowserTest::CreateOffTheRecordBrowser() { | 142 Shell* ContentBrowserTest::CreateOffTheRecordBrowser() { |
138 ShellContentBrowserClient* browser_client = | 143 ShellContentBrowserClient* browser_client = |
139 static_cast<ShellContentBrowserClient*>(GetContentClient()->browser()); | 144 static_cast<ShellContentBrowserClient*>(GetContentClient()->browser()); |
140 return Shell::CreateNewWindow( | 145 return Shell::CreateNewWindow( |
141 browser_client->off_the_record_browser_context(), | 146 browser_client->off_the_record_browser_context(), |
142 GURL(chrome::kAboutBlankURL), | 147 GURL(chrome::kAboutBlankURL), |
143 NULL, | 148 NULL, |
144 MSG_ROUTING_NONE, | 149 MSG_ROUTING_NONE, |
145 NULL); | 150 NULL); |
146 } | 151 } |
147 | 152 |
148 } // namespace content | 153 } // namespace content |
OLD | NEW |