forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 0
/
weblayer_browser_test.h
51 lines (37 loc) · 1.39 KB
/
weblayer_browser_test.h
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
// Copyright 2019 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 WEBLAYER_TEST_WEBLAYER_BROWSER_TEST_H_
#define WEBLAYER_TEST_WEBLAYER_BROWSER_TEST_H_
#include "base/memory/raw_ptr.h"
#include "content/public/test/browser_test.h"
#include "content/public/test/browser_test_base.h"
namespace content {
class BrowserContext;
}
namespace weblayer {
class ProfileImpl;
class Shell;
class WebLayerBrowserTest : public content::BrowserTestBase {
public:
WebLayerBrowserTest();
WebLayerBrowserTest(const WebLayerBrowserTest&) = delete;
WebLayerBrowserTest& operator=(const WebLayerBrowserTest&) = delete;
~WebLayerBrowserTest() override;
// content::BrowserTestBase implementation.
void SetUp() override;
void PreRunTestOnMainThread() override;
void PostRunTestOnMainThread() override;
// Configures this object such that when it starts the shell it does so in
// incognito mode. Must be invoked before SetUp() has been called.
void SetShellStartsInIncognitoMode();
// Returns the window for the test.
Shell* shell() const { return shell_; }
ProfileImpl* GetProfile();
content::BrowserContext* GetBrowserContext();
private:
raw_ptr<Shell> shell_ = nullptr;
bool start_in_incognito_mode_ = false;
};
} // namespace weblayer
#endif // WEBLAYER_TEST_WEBLAYER_BROWSER_TEST_H_