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/macros.h" | 9 #include "base/macros.h" |
10 #include "base/message_loop/message_loop.h" | 10 #include "base/message_loop/message_loop.h" |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 // AddTab(browser(), GURL("http://foo/1")); | 54 // AddTab(browser(), GURL("http://foo/1")); |
55 // NavigationController* controller = | 55 // NavigationController* controller = |
56 // &browser()->tab_strip_model()->GetWebContentsAt(0)->GetController(); | 56 // &browser()->tab_strip_model()->GetWebContentsAt(0)->GetController(); |
57 // | 57 // |
58 // // Navigate somewhere else. | 58 // // Navigate somewhere else. |
59 // GURL url2("http://foo/2"); | 59 // GURL url2("http://foo/2"); |
60 // NavigateAndCommit(controller, url2); | 60 // NavigateAndCommit(controller, url2); |
61 // | 61 // |
62 // // This is equivalent to the above, and lets you test pending navigations. | 62 // // This is equivalent to the above, and lets you test pending navigations. |
63 // browser()->OpenURL(OpenURLParams( | 63 // browser()->OpenURL(OpenURLParams( |
64 // GURL("http://foo/2"), GURL(), CURRENT_TAB, | 64 // GURL("http://foo/2"), GURL(), WindowOpenDisposition::CURRENT_TAB, |
65 // ui::PAGE_TRANSITION_TYPED, false)); | 65 // ui::PAGE_TRANSITION_TYPED, false)); |
66 // CommitPendingLoad(controller); | 66 // CommitPendingLoad(controller); |
67 // | 67 // |
68 // Subclasses must invoke BrowserWithTestWindowTest::SetUp as it is responsible | 68 // Subclasses must invoke BrowserWithTestWindowTest::SetUp as it is responsible |
69 // for creating the various objects of this class. | 69 // for creating the various objects of this class. |
70 class BrowserWithTestWindowTest : public testing::Test { | 70 class BrowserWithTestWindowTest : public testing::Test { |
71 public: | 71 public: |
72 // Creates a BrowserWithTestWindowTest for which the initial window will be | 72 // Creates a BrowserWithTestWindowTest for which the initial window will be |
73 // a tabbed browser created on the native desktop, which is not a hosted app. | 73 // a tabbed browser created on the native desktop, which is not a hosted app. |
74 BrowserWithTestWindowTest(); | 74 BrowserWithTestWindowTest(); |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
183 // The type of browser to create (tabbed or popup). | 183 // The type of browser to create (tabbed or popup). |
184 Browser::Type browser_type_; | 184 Browser::Type browser_type_; |
185 | 185 |
186 // Whether the browser is part of a hosted app. | 186 // Whether the browser is part of a hosted app. |
187 bool hosted_app_; | 187 bool hosted_app_; |
188 | 188 |
189 DISALLOW_COPY_AND_ASSIGN(BrowserWithTestWindowTest); | 189 DISALLOW_COPY_AND_ASSIGN(BrowserWithTestWindowTest); |
190 }; | 190 }; |
191 | 191 |
192 #endif // CHROME_TEST_BASE_BROWSER_WITH_TEST_WINDOW_TEST_H_ | 192 #endif // CHROME_TEST_BASE_BROWSER_WITH_TEST_WINDOW_TEST_H_ |
OLD | NEW |