| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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/browser_with_test_window_test.h" | 5 #include "chrome/test/browser_with_test_window_test.h" |
| 6 | 6 |
| 7 #if defined(OS_WIN) | 7 #if defined(OS_WIN) |
| 8 #include <ole2.h> | 8 #include <ole2.h> |
| 9 #endif // defined(OS_WIN) | 9 #endif // defined(OS_WIN) |
| 10 | 10 |
| 11 #include "chrome/browser/browser.h" | 11 #include "chrome/browser/browser.h" |
| 12 #include "chrome/browser/tab_contents/navigation_entry.h" | 12 #include "chrome/browser/tab_contents/navigation_entry.h" |
| 13 #include "chrome/common/render_messages.h" | 13 #include "chrome/common/render_messages.h" |
| 14 #include "chrome/test/testing_profile.h" | 14 #include "chrome/test/testing_profile.h" |
| 15 | 15 |
| 16 BrowserWithTestWindowTest::BrowserWithTestWindowTest() | 16 BrowserWithTestWindowTest::BrowserWithTestWindowTest() |
| 17 : rph_factory_(), | 17 : ui_thread_(ChromeThread::UI, message_loop()), |
| 18 rph_factory_(), |
| 18 rvh_factory_(&rph_factory_) { | 19 rvh_factory_(&rph_factory_) { |
| 19 #if defined(OS_WIN) | 20 #if defined(OS_WIN) |
| 20 OleInitialize(NULL); | 21 OleInitialize(NULL); |
| 21 #endif | 22 #endif |
| 22 } | 23 } |
| 23 | 24 |
| 24 void BrowserWithTestWindowTest::SetUp() { | 25 void BrowserWithTestWindowTest::SetUp() { |
| 25 // NOTE: I have a feeling we're going to want virtual methods for creating | 26 // NOTE: I have a feeling we're going to want virtual methods for creating |
| 26 // these, as such they're in SetUp instead of the constructor. | 27 // these, as such they're in SetUp instead of the constructor. |
| 27 profile_.reset(new TestingProfile()); | 28 profile_.reset(new TestingProfile()); |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 void BrowserWithTestWindowTest::NavigateAndCommit( | 89 void BrowserWithTestWindowTest::NavigateAndCommit( |
| 89 NavigationController* controller, | 90 NavigationController* controller, |
| 90 const GURL& url) { | 91 const GURL& url) { |
| 91 controller->LoadURL(url, GURL(), 0); | 92 controller->LoadURL(url, GURL(), 0); |
| 92 CommitPendingLoad(controller); | 93 CommitPendingLoad(controller); |
| 93 } | 94 } |
| 94 | 95 |
| 95 void BrowserWithTestWindowTest::NavigateAndCommitActiveTab(const GURL& url) { | 96 void BrowserWithTestWindowTest::NavigateAndCommitActiveTab(const GURL& url) { |
| 96 NavigateAndCommit(&browser()->GetSelectedTabContents()->controller(), url); | 97 NavigateAndCommit(&browser()->GetSelectedTabContents()->controller(), url); |
| 97 } | 98 } |
| OLD | NEW |