blob: a098fb3978a11af13b700ac2724031dcfa4d4c87 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
|
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef CHROME_BROWSER_UI_BROWSER_NAVIGATOR_BROWSERTEST_H_
#define CHROME_BROWSER_UI_BROWSER_NAVIGATOR_BROWSERTEST_H_
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/browser_list_observer.h"
#include "chrome/test/base/in_process_browser_test.h"
#include "content/public/browser/notification_types.h"
class Profile;
namespace chrome {
struct NavigateParams;
}
namespace content {
class WebContents;
}
// Browsertest class for testing the browser navigation. It is also a base class
// for the |BrowserGuestModeNavigation| which tests navigation while in guest
// mode.
class BrowserNavigatorTest : public InProcessBrowserTest,
public chrome::BrowserListObserver,
public content::NotificationObserver {
protected:
chrome::NavigateParams MakeNavigateParams() const;
chrome::NavigateParams MakeNavigateParams(Browser* browser) const;
Browser* CreateEmptyBrowserForType(Browser::Type type, Profile* profile);
Browser* CreateEmptyBrowserForApp(Browser::Type type, Profile* profile);
content::WebContents* CreateWebContents();
void RunSuppressTest(WindowOpenDisposition disposition);
void RunUseNonIncognitoWindowTest(const GURL& url);
void RunDoNothingIfIncognitoIsForcedTest(const GURL& url);
// InProcessBrowserTest:
virtual void SetUpOnMainThread() OVERRIDE;
virtual void CleanUpOnMainThread() OVERRIDE;
// chrome::BrowserListObserver:
virtual void OnBrowserSetLastActive(Browser* browser) OVERRIDE;
// content::NotificationObserver:
virtual void Observe(int type,
const content::NotificationSource& source,
const content::NotificationDetails& details) OVERRIDE;
size_t created_tab_contents_count_;
const Browser* last_activated_browser_;
};
#endif // CHROME_BROWSER_UI_BROWSER_NAVIGATOR_BROWSERTEST_H_
|