| 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/auto_reset.h" | 7 #include "base/auto_reset.h" |
| 8 #include "base/bind.h" | 8 #include "base/bind.h" |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/debug/stack_trace.h" | 10 #include "base/debug/stack_trace.h" |
| (...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 225 | 225 |
| 226 content::ResourceContext* InProcessBrowserTest::GetResourceContext() { | 226 content::ResourceContext* InProcessBrowserTest::GetResourceContext() { |
| 227 return browser_->profile()->GetResourceContext(); | 227 return browser_->profile()->GetResourceContext(); |
| 228 } | 228 } |
| 229 | 229 |
| 230 void InProcessBrowserTest::AddTabAtIndexToBrowser( | 230 void InProcessBrowserTest::AddTabAtIndexToBrowser( |
| 231 Browser* browser, | 231 Browser* browser, |
| 232 int index, | 232 int index, |
| 233 const GURL& url, | 233 const GURL& url, |
| 234 content::PageTransition transition) { | 234 content::PageTransition transition) { |
| 235 browser::NavigateParams params(browser, url, transition); | 235 chrome::NavigateParams params(browser, url, transition); |
| 236 params.tabstrip_index = index; | 236 params.tabstrip_index = index; |
| 237 params.disposition = NEW_FOREGROUND_TAB; | 237 params.disposition = NEW_FOREGROUND_TAB; |
| 238 browser::Navigate(¶ms); | 238 chrome::Navigate(¶ms); |
| 239 } | 239 } |
| 240 | 240 |
| 241 void InProcessBrowserTest::AddTabAtIndex( | 241 void InProcessBrowserTest::AddTabAtIndex( |
| 242 int index, | 242 int index, |
| 243 const GURL& url, | 243 const GURL& url, |
| 244 content::PageTransition transition) { | 244 content::PageTransition transition) { |
| 245 AddTabAtIndexToBrowser(browser(), index, url, transition); | 245 AddTabAtIndexToBrowser(browser(), index, url, transition); |
| 246 } | 246 } |
| 247 | 247 |
| 248 bool InProcessBrowserTest::SetUpUserDataDirectory() { | 248 bool InProcessBrowserTest::SetUpUserDataDirectory() { |
| (...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 404 // On the Mac, this eventually reaches | 404 // On the Mac, this eventually reaches |
| 405 // -[BrowserWindowController windowWillClose:], which will post a deferred | 405 // -[BrowserWindowController windowWillClose:], which will post a deferred |
| 406 // -autorelease on itself to ultimately destroy the Browser object. The line | 406 // -autorelease on itself to ultimately destroy the Browser object. The line |
| 407 // below is necessary to pump these pending messages to ensure all Browsers | 407 // below is necessary to pump these pending messages to ensure all Browsers |
| 408 // get deleted. | 408 // get deleted. |
| 409 ui_test_utils::RunAllPendingInMessageLoop(); | 409 ui_test_utils::RunAllPendingInMessageLoop(); |
| 410 delete autorelease_pool_; | 410 delete autorelease_pool_; |
| 411 autorelease_pool_ = NULL; | 411 autorelease_pool_ = NULL; |
| 412 #endif | 412 #endif |
| 413 } | 413 } |
| OLD | NEW |