| 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 #ifndef CHROME_TEST_BASE_BROWSER_WITH_TEST_WINDOW_TEST_H_ | 5 #ifndef CHROME_TEST_BASE_BROWSER_WITH_TEST_WINDOW_TEST_H_ |
| 6 #define CHROME_TEST_BASE_BROWSER_WITH_TEST_WINDOW_TEST_H_ | 6 #define CHROME_TEST_BASE_BROWSER_WITH_TEST_WINDOW_TEST_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "base/message_loop.h" | 9 #include "base/message_loop.h" |
| 10 #include "chrome/browser/ui/browser.h" | 10 #include "chrome/browser/ui/browser.h" |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 void set_window(TestBrowserWindow* window) { | 70 void set_window(TestBrowserWindow* window) { |
| 71 window_.reset(window); | 71 window_.reset(window); |
| 72 } | 72 } |
| 73 | 73 |
| 74 Browser* browser() const { return browser_.get(); } | 74 Browser* browser() const { return browser_.get(); } |
| 75 void set_browser(Browser* browser) { | 75 void set_browser(Browser* browser) { |
| 76 browser_.reset(browser); | 76 browser_.reset(browser); |
| 77 } | 77 } |
| 78 | 78 |
| 79 TestingProfile* profile() const { return profile_.get(); } | 79 TestingProfile* profile() const { return profile_.get(); } |
| 80 void set_profile(TestingProfile* profile) { | 80 void set_profile(TestingProfile* profile); |
| 81 profile_.reset(profile); | |
| 82 } | |
| 83 | 81 |
| 84 MessageLoop* message_loop() { return &ui_loop_; } | 82 MessageLoop* message_loop() { return &ui_loop_; } |
| 85 | 83 |
| 86 // Adds a tab to |browser| with the given URL and commits the load. | 84 // Adds a tab to |browser| with the given URL and commits the load. |
| 87 // This is a convenience function. The new tab will be added at index 0. | 85 // This is a convenience function. The new tab will be added at index 0. |
| 88 void AddTab(Browser* browser, const GURL& url); | 86 void AddTab(Browser* browser, const GURL& url); |
| 89 | 87 |
| 90 // Commits the pending load on the given controller. It will keep the | 88 // Commits the pending load on the given controller. It will keep the |
| 91 // URL of the pending load. If there is no pending load, this does nothing. | 89 // URL of the pending load. If there is no pending load, this does nothing. |
| 92 void CommitPendingLoad(content::NavigationController* controller); | 90 void CommitPendingLoad(content::NavigationController* controller); |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 132 #endif | 130 #endif |
| 133 | 131 |
| 134 #if defined(OS_WIN) | 132 #if defined(OS_WIN) |
| 135 ui::ScopedOleInitializer ole_initializer_; | 133 ui::ScopedOleInitializer ole_initializer_; |
| 136 #endif | 134 #endif |
| 137 | 135 |
| 138 DISALLOW_COPY_AND_ASSIGN(BrowserWithTestWindowTest); | 136 DISALLOW_COPY_AND_ASSIGN(BrowserWithTestWindowTest); |
| 139 }; | 137 }; |
| 140 | 138 |
| 141 #endif // CHROME_TEST_BASE_BROWSER_WITH_TEST_WINDOW_TEST_H_ | 139 #endif // CHROME_TEST_BASE_BROWSER_WITH_TEST_WINDOW_TEST_H_ |
| OLD | NEW |