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 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 pool.Recycle(); | 108 pool.Recycle(); |
109 #endif | 109 #endif |
110 | 110 |
111 SetUpOnMainThread(); | 111 SetUpOnMainThread(); |
112 | 112 |
113 RunTestOnMainThread(); | 113 RunTestOnMainThread(); |
114 #if defined(OS_MACOSX) | 114 #if defined(OS_MACOSX) |
115 pool.Recycle(); | 115 pool.Recycle(); |
116 #endif | 116 #endif |
117 | 117 |
118 for (RenderProcessHost::iterator i(RenderProcessHost::AllHostsIterator()); | 118 Shell::CloseAllWindows(); |
119 !i.IsAtEnd(); i.Advance()) { | |
120 i.GetCurrentValue()->FastShutdownIfPossible(); | |
121 } | |
122 } | 119 } |
123 | 120 |
124 Shell* ContentBrowserTest::CreateBrowser() { | 121 Shell* ContentBrowserTest::CreateBrowser() { |
125 ShellContentBrowserClient* browser_client = | 122 ShellContentBrowserClient* browser_client = |
126 static_cast<ShellContentBrowserClient*>(GetContentClient()->browser()); | 123 static_cast<ShellContentBrowserClient*>(GetContentClient()->browser()); |
127 return Shell::CreateNewWindow( | 124 return Shell::CreateNewWindow( |
128 browser_client->browser_context(), | 125 browser_client->browser_context(), |
129 GURL(chrome::kAboutBlankURL), | 126 GURL(chrome::kAboutBlankURL), |
130 NULL, | 127 NULL, |
131 MSG_ROUTING_NONE, | 128 MSG_ROUTING_NONE, |
132 NULL); | 129 NULL); |
133 } | 130 } |
134 | 131 |
135 Shell* ContentBrowserTest::CreateOffTheRecordBrowser() { | 132 Shell* ContentBrowserTest::CreateOffTheRecordBrowser() { |
136 ShellContentBrowserClient* browser_client = | 133 ShellContentBrowserClient* browser_client = |
137 static_cast<ShellContentBrowserClient*>(GetContentClient()->browser()); | 134 static_cast<ShellContentBrowserClient*>(GetContentClient()->browser()); |
138 return Shell::CreateNewWindow( | 135 return Shell::CreateNewWindow( |
139 browser_client->off_the_record_browser_context(), | 136 browser_client->off_the_record_browser_context(), |
140 GURL(chrome::kAboutBlankURL), | 137 GURL(chrome::kAboutBlankURL), |
141 NULL, | 138 NULL, |
142 MSG_ROUTING_NONE, | 139 MSG_ROUTING_NONE, |
143 NULL); | 140 NULL); |
144 } | 141 } |
145 | 142 |
146 } // namespace content | 143 } // namespace content |
OLD | NEW |