forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathweblayer_browser_test.cc
36 lines (27 loc) · 1.04 KB
/
weblayer_browser_test.cc
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
// 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.
#include "weblayer/test/weblayer_browser_test.h"
#include "base/base_paths.h"
#include "base/command_line.h"
#include "weblayer/shell/browser/shell.h"
#include "weblayer/shell/common/shell_switches.h"
namespace weblayer {
WebLayerBrowserTest::WebLayerBrowserTest() {
CreateTestServer(base::FilePath(FILE_PATH_LITERAL("weblayer/test/data")));
}
WebLayerBrowserTest::~WebLayerBrowserTest() = default;
void WebLayerBrowserTest::SetUp() {
base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
command_line->AppendSwitch(switches::kNoInitialNavigation);
SetUpCommandLine(command_line);
content::BrowserTestBase::SetUp();
}
void WebLayerBrowserTest::PreRunTestOnMainThread() {
ASSERT_EQ(Shell::windows().size(), 1u);
shell_ = Shell::windows()[0];
}
void WebLayerBrowserTest::PostRunTestOnMainThread() {
Shell::CloseAllWindows();
}
} // namespace weblayer