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 "chrome/test/base/in_process_browser_test.h" | 5 #include "chrome/test/base/in_process_browser_test.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/debug/stack_trace.h" | 9 #include "base/debug/stack_trace.h" |
10 #include "base/file_path.h" | 10 #include "base/file_path.h" |
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
186 } | 186 } |
187 } | 187 } |
188 return test_launcher_utils::OverrideUserDataDir(user_data_dir); | 188 return test_launcher_utils::OverrideUserDataDir(user_data_dir); |
189 } | 189 } |
190 | 190 |
191 void InProcessBrowserTest::TearDown() { | 191 void InProcessBrowserTest::TearDown() { |
192 DCHECK(!g_browser_process); | 192 DCHECK(!g_browser_process); |
193 BrowserTestBase::TearDown(); | 193 BrowserTestBase::TearDown(); |
194 } | 194 } |
195 | 195 |
196 const content::ResourceContext& InProcessBrowserTest::GetResourceContext() { | 196 content::ResourceContext* InProcessBrowserTest::GetResourceContext() { |
197 return browser_->profile()->GetResourceContext(); | 197 return browser_->profile()->GetResourceContext(); |
198 } | 198 } |
199 | 199 |
200 void InProcessBrowserTest::AddTabAtIndexToBrowser( | 200 void InProcessBrowserTest::AddTabAtIndexToBrowser( |
201 Browser* browser, | 201 Browser* browser, |
202 int index, | 202 int index, |
203 const GURL& url, | 203 const GURL& url, |
204 content::PageTransition transition) { | 204 content::PageTransition transition) { |
205 browser::NavigateParams params(browser, url, transition); | 205 browser::NavigateParams params(browser, url, transition); |
206 params.tabstrip_index = index; | 206 params.tabstrip_index = index; |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
322 if (BrowserList::size() == 0) | 322 if (BrowserList::size() == 0) |
323 return; | 323 return; |
324 | 324 |
325 // Invoke CloseAllBrowsersAndMayExit on a running message loop. | 325 // Invoke CloseAllBrowsersAndMayExit on a running message loop. |
326 // CloseAllBrowsersAndMayExit exits the message loop after everything has been | 326 // CloseAllBrowsersAndMayExit exits the message loop after everything has been |
327 // shut down properly. | 327 // shut down properly. |
328 MessageLoopForUI::current()->PostTask(FROM_HERE, | 328 MessageLoopForUI::current()->PostTask(FROM_HERE, |
329 base::Bind(&BrowserList::AttemptExit)); | 329 base::Bind(&BrowserList::AttemptExit)); |
330 ui_test_utils::RunMessageLoop(); | 330 ui_test_utils::RunMessageLoop(); |
331 } | 331 } |
OLD | NEW |