| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/in_process_browser_test.h" | 5 #include "chrome/test/in_process_browser_test.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/file_path.h" | 8 #include "base/file_path.h" |
| 9 #include "base/file_util.h" | 9 #include "base/file_util.h" |
| 10 #include "base/path_service.h" | 10 #include "base/path_service.h" |
| (...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 244 return http_server_.get(); | 244 return http_server_.get(); |
| 245 } | 245 } |
| 246 | 246 |
| 247 // Creates a browser with a single tab (about:blank), waits for the tab to | 247 // Creates a browser with a single tab (about:blank), waits for the tab to |
| 248 // finish loading and shows the browser. | 248 // finish loading and shows the browser. |
| 249 Browser* InProcessBrowserTest::CreateBrowser(Profile* profile) { | 249 Browser* InProcessBrowserTest::CreateBrowser(Profile* profile) { |
| 250 Browser* browser = Browser::Create(profile); | 250 Browser* browser = Browser::Create(profile); |
| 251 | 251 |
| 252 browser->AddTabWithURL(GURL(chrome::kAboutBlankURL), GURL(), | 252 browser->AddTabWithURL(GURL(chrome::kAboutBlankURL), GURL(), |
| 253 PageTransition::START_PAGE, -1, | 253 PageTransition::START_PAGE, -1, |
| 254 TabStripModel::ADD_SELECTED, NULL, std::string()); | 254 TabStripModel::ADD_SELECTED, NULL, std::string(), |
| 255 &browser); |
| 255 | 256 |
| 256 // Wait for the page to finish loading. | 257 // Wait for the page to finish loading. |
| 257 ui_test_utils::WaitForNavigation( | 258 ui_test_utils::WaitForNavigation( |
| 258 &browser->GetSelectedTabContents()->controller()); | 259 &browser->GetSelectedTabContents()->controller()); |
| 259 | 260 |
| 260 browser->window()->Show(); | 261 browser->window()->Show(); |
| 261 | 262 |
| 262 return browser; | 263 return browser; |
| 263 } | 264 } |
| 264 | 265 |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 336 | 337 |
| 337 GTEST_NONFATAL_FAILURE_(error_message.c_str()); | 338 GTEST_NONFATAL_FAILURE_(error_message.c_str()); |
| 338 | 339 |
| 339 MessageLoopForUI::current()->Quit(); | 340 MessageLoopForUI::current()->Quit(); |
| 340 } | 341 } |
| 341 | 342 |
| 342 void InProcessBrowserTest::SetInitialTimeoutInMS(int timeout_value) { | 343 void InProcessBrowserTest::SetInitialTimeoutInMS(int timeout_value) { |
| 343 DCHECK_GT(timeout_value, 0); | 344 DCHECK_GT(timeout_value, 0); |
| 344 initial_timeout_ = timeout_value; | 345 initial_timeout_ = timeout_value; |
| 345 } | 346 } |
| OLD | NEW |