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/files/file_path.h" | 8 #include "base/files/file_path.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/message_loop.h" | 10 #include "base/message_loop.h" |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
115 // Pump startup related events. | 115 // Pump startup related events. |
116 base::MessageLoopForUI::current()->RunUntilIdle(); | 116 base::MessageLoopForUI::current()->RunUntilIdle(); |
117 | 117 |
118 #if defined(OS_MACOSX) | 118 #if defined(OS_MACOSX) |
119 pool.Recycle(); | 119 pool.Recycle(); |
120 #endif | 120 #endif |
121 | 121 |
122 SetUpOnMainThread(); | 122 SetUpOnMainThread(); |
123 | 123 |
124 RunTestOnMainThread(); | 124 RunTestOnMainThread(); |
| 125 |
| 126 TearDownOnMainThread(); |
125 #if defined(OS_MACOSX) | 127 #if defined(OS_MACOSX) |
126 pool.Recycle(); | 128 pool.Recycle(); |
127 #endif | 129 #endif |
128 | 130 |
129 for (RenderProcessHost::iterator i(RenderProcessHost::AllHostsIterator()); | 131 for (RenderProcessHost::iterator i(RenderProcessHost::AllHostsIterator()); |
130 !i.IsAtEnd(); i.Advance()) { | 132 !i.IsAtEnd(); i.Advance()) { |
131 i.GetCurrentValue()->FastShutdownIfPossible(); | 133 i.GetCurrentValue()->FastShutdownIfPossible(); |
132 } | 134 } |
133 | 135 |
134 Shell::CloseAllWindows(); | 136 Shell::CloseAllWindows(); |
(...skipping 11 matching lines...) Expand all Loading... |
146 Shell* ContentBrowserTest::CreateOffTheRecordBrowser() { | 148 Shell* ContentBrowserTest::CreateOffTheRecordBrowser() { |
147 return Shell::CreateNewWindow( | 149 return Shell::CreateNewWindow( |
148 ShellContentBrowserClient::Get()->off_the_record_browser_context(), | 150 ShellContentBrowserClient::Get()->off_the_record_browser_context(), |
149 GURL(kAboutBlankURL), | 151 GURL(kAboutBlankURL), |
150 NULL, | 152 NULL, |
151 MSG_ROUTING_NONE, | 153 MSG_ROUTING_NONE, |
152 gfx::Size()); | 154 gfx::Size()); |
153 } | 155 } |
154 | 156 |
155 } // namespace content | 157 } // namespace content |
OLD | NEW |