| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_BROWSER_UI_BROWSER_NAVIGATOR_BROWSERTEST_H_ | 5 #ifndef CHROME_BROWSER_UI_BROWSER_NAVIGATOR_BROWSERTEST_H_ |
| 6 #define CHROME_BROWSER_UI_BROWSER_NAVIGATOR_BROWSERTEST_H_ | 6 #define CHROME_BROWSER_UI_BROWSER_NAVIGATOR_BROWSERTEST_H_ |
| 7 | 7 |
| 8 #include "chrome/browser/ui/browser.h" | 8 #include "chrome/browser/ui/browser.h" |
| 9 #include "chrome/test/base/in_process_browser_test.h" | 9 #include "chrome/test/base/in_process_browser_test.h" |
| 10 #include "content/public/browser/notification_types.h" | 10 #include "content/public/browser/notification_types.h" |
| 11 | 11 |
| 12 class Profile; | 12 class Profile; |
| 13 class TabContents; | 13 class TabContents; |
| 14 typedef TabContents TabContentsWrapper; | |
| 15 | 14 |
| 16 namespace browser { | 15 namespace browser { |
| 17 struct NavigateParams; | 16 struct NavigateParams; |
| 18 } | 17 } |
| 19 | 18 |
| 20 // Browsertest class for testing the browser navigation. It is also a base class | 19 // Browsertest class for testing the browser navigation. It is also a base class |
| 21 // for the |BrowserGuestModeNavigation| which tests navigation while in guest | 20 // for the |BrowserGuestModeNavigation| which tests navigation while in guest |
| 22 // mode. | 21 // mode. |
| 23 class BrowserNavigatorTest : public InProcessBrowserTest, | 22 class BrowserNavigatorTest : public InProcessBrowserTest, |
| 24 public content::NotificationObserver { | 23 public content::NotificationObserver { |
| 25 protected: | 24 protected: |
| 26 browser::NavigateParams MakeNavigateParams() const; | 25 browser::NavigateParams MakeNavigateParams() const; |
| 27 browser::NavigateParams MakeNavigateParams(Browser* browser) const; | 26 browser::NavigateParams MakeNavigateParams(Browser* browser) const; |
| 28 | 27 |
| 29 Browser* CreateEmptyBrowserForType(Browser::Type type, Profile* profile); | 28 Browser* CreateEmptyBrowserForType(Browser::Type type, Profile* profile); |
| 30 Browser* CreateEmptyBrowserForApp(Browser::Type type, Profile* profile); | 29 Browser* CreateEmptyBrowserForApp(Browser::Type type, Profile* profile); |
| 31 | 30 |
| 32 TabContentsWrapper* CreateTabContents(); | 31 TabContents* CreateTabContents(); |
| 33 | 32 |
| 34 void RunSuppressTest(WindowOpenDisposition disposition); | 33 void RunSuppressTest(WindowOpenDisposition disposition); |
| 35 void RunUseNonIncognitoWindowTest(const GURL& url); | 34 void RunUseNonIncognitoWindowTest(const GURL& url); |
| 36 void RunDoNothingIfIncognitoIsForcedTest(const GURL& url); | 35 void RunDoNothingIfIncognitoIsForcedTest(const GURL& url); |
| 37 | 36 |
| 38 // content::NotificationObserver: | 37 // content::NotificationObserver: |
| 39 virtual void Observe(int type, | 38 virtual void Observe(int type, |
| 40 const content::NotificationSource& source, | 39 const content::NotificationSource& source, |
| 41 const content::NotificationDetails& details) OVERRIDE; | 40 const content::NotificationDetails& details) OVERRIDE; |
| 42 | 41 |
| 43 size_t created_tab_contents_count_; | 42 size_t created_tab_contents_count_; |
| 44 }; | 43 }; |
| 45 | 44 |
| 46 #endif // CHROME_BROWSER_UI_BROWSER_NAVIGATOR_BROWSERTEST_H_ | 45 #endif // CHROME_BROWSER_UI_BROWSER_NAVIGATOR_BROWSERTEST_H_ |
| OLD | NEW |