| 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 | 7 |
| 8 #include "base/at_exit.h" | 8 #include "base/at_exit.h" |
| 9 #include "base/message_loop/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
| 10 #include "chrome/browser/ui/browser.h" | 10 #include "chrome/browser/ui/browser.h" |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 // for creating the various objects of this class. | 68 // for creating the various objects of this class. |
| 69 class BrowserWithTestWindowTest : public testing::Test { | 69 class BrowserWithTestWindowTest : public testing::Test { |
| 70 public: | 70 public: |
| 71 // Creates a BrowserWithTestWindowTest for which the initial window will be | 71 // Creates a BrowserWithTestWindowTest for which the initial window will be |
| 72 // a tabbed browser created on the native desktop, which is not a hosted app. | 72 // a tabbed browser created on the native desktop, which is not a hosted app. |
| 73 BrowserWithTestWindowTest(); | 73 BrowserWithTestWindowTest(); |
| 74 | 74 |
| 75 // Creates a BrowserWithTestWindowTest for which the initial window will be | 75 // Creates a BrowserWithTestWindowTest for which the initial window will be |
| 76 // the specified type. | 76 // the specified type. |
| 77 BrowserWithTestWindowTest(Browser::Type browser_type, | 77 BrowserWithTestWindowTest(Browser::Type browser_type, |
| 78 chrome::HostDesktopType host_desktop_type, | 78 ui::HostDesktopType host_desktop_type, |
| 79 bool hosted_app); | 79 bool hosted_app); |
| 80 | 80 |
| 81 ~BrowserWithTestWindowTest() override; | 81 ~BrowserWithTestWindowTest() override; |
| 82 | 82 |
| 83 void SetUp() override; | 83 void SetUp() override; |
| 84 void TearDown() override; | 84 void TearDown() override; |
| 85 | 85 |
| 86 protected: | 86 protected: |
| 87 BrowserWindow* window() const { return window_.get(); } | 87 BrowserWindow* window() const { return window_.get(); } |
| 88 | 88 |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 140 | 140 |
| 141 // Creates the BrowserWindow used by this test. The caller owns the return | 141 // Creates the BrowserWindow used by this test. The caller owns the return |
| 142 // value. Can return NULL to use the default window created by Browser. | 142 // value. Can return NULL to use the default window created by Browser. |
| 143 virtual BrowserWindow* CreateBrowserWindow(); | 143 virtual BrowserWindow* CreateBrowserWindow(); |
| 144 | 144 |
| 145 // Creates the browser given |profile|, |browser_type|, |hosted_app|, | 145 // Creates the browser given |profile|, |browser_type|, |hosted_app|, |
| 146 // |host_desktop_type| and |browser_window|. The caller owns the return value. | 146 // |host_desktop_type| and |browser_window|. The caller owns the return value. |
| 147 virtual Browser* CreateBrowser(Profile* profile, | 147 virtual Browser* CreateBrowser(Profile* profile, |
| 148 Browser::Type browser_type, | 148 Browser::Type browser_type, |
| 149 bool hosted_app, | 149 bool hosted_app, |
| 150 chrome::HostDesktopType host_desktop_type, | 150 ui::HostDesktopType host_desktop_type, |
| 151 BrowserWindow* browser_window); | 151 BrowserWindow* browser_window); |
| 152 | 152 |
| 153 private: | 153 private: |
| 154 // We need to create a MessageLoop, otherwise a bunch of things fails. | 154 // We need to create a MessageLoop, otherwise a bunch of things fails. |
| 155 content::TestBrowserThreadBundle thread_bundle_; | 155 content::TestBrowserThreadBundle thread_bundle_; |
| 156 base::ShadowingAtExitManager at_exit_manager_; | 156 base::ShadowingAtExitManager at_exit_manager_; |
| 157 | 157 |
| 158 #if defined(OS_CHROMEOS) | 158 #if defined(OS_CHROMEOS) |
| 159 chromeos::ScopedTestDeviceSettingsService test_device_settings_service_; | 159 chromeos::ScopedTestDeviceSettingsService test_device_settings_service_; |
| 160 chromeos::ScopedTestCrosSettings test_cros_settings_; | 160 chromeos::ScopedTestCrosSettings test_cros_settings_; |
| (...skipping 18 matching lines...) Expand all Loading... |
| 179 #endif | 179 #endif |
| 180 | 180 |
| 181 #if defined(OS_WIN) | 181 #if defined(OS_WIN) |
| 182 ui::ScopedOleInitializer ole_initializer_; | 182 ui::ScopedOleInitializer ole_initializer_; |
| 183 #endif | 183 #endif |
| 184 | 184 |
| 185 // The type of browser to create (tabbed or popup). | 185 // The type of browser to create (tabbed or popup). |
| 186 Browser::Type browser_type_; | 186 Browser::Type browser_type_; |
| 187 | 187 |
| 188 // The desktop to create the initial window on. | 188 // The desktop to create the initial window on. |
| 189 chrome::HostDesktopType host_desktop_type_; | 189 ui::HostDesktopType host_desktop_type_; |
| 190 | 190 |
| 191 // Whether the browser is part of a hosted app. | 191 // Whether the browser is part of a hosted app. |
| 192 bool hosted_app_; | 192 bool hosted_app_; |
| 193 | 193 |
| 194 DISALLOW_COPY_AND_ASSIGN(BrowserWithTestWindowTest); | 194 DISALLOW_COPY_AND_ASSIGN(BrowserWithTestWindowTest); |
| 195 }; | 195 }; |
| 196 | 196 |
| 197 #endif // CHROME_TEST_BASE_BROWSER_WITH_TEST_WINDOW_TEST_H_ | 197 #endif // CHROME_TEST_BASE_BROWSER_WITH_TEST_WINDOW_TEST_H_ |
| OLD | NEW |