Commit 75a1233d authored by Peter Kvitek's avatar Peter Kvitek Committed by Commit Bot

[Headless] Moved remaining headless tests from /lib to /test.

Headless tests were scattered between /lib and /test directories.
Moving them to where they all belong helps to keep things nice and tidy.

Change-Id: I0aee0ae4da8e1f19dd45beb6cda2f108d9ec26a2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2511751
Commit-Queue: Peter Kvitek <kvitekp@chromium.org>
Reviewed-by: default avatarDmitry Gozman <dgozman@chromium.org>
Reviewed-by: default avatarJochen Eisinger <jochen@chromium.org>
Reviewed-by: default avatarAndrey Kosyakov <caseq@chromium.org>
Cr-Commit-Position: refs/heads/master@{#824409}
parent 8a331bdc
...@@ -625,15 +625,15 @@ if (is_mac) { ...@@ -625,15 +625,15 @@ if (is_mac) {
test("headless_browsertests") { test("headless_browsertests") {
configs += [ "//net:net_test_config" ] configs += [ "//net:net_test_config" ]
sources = [ sources = [
"lib/headless_browser_browsertest.cc", "test/headless_browser_browsertest.cc",
"lib/headless_browser_context_browsertest.cc", "test/headless_browser_context_browsertest.cc",
"lib/headless_devtools_client_browsertest.cc",
"lib/headless_origin_trials_browsertest.cc",
"lib/headless_web_contents_browsertest.cc",
"test/headless_browser_test.cc", "test/headless_browser_test.cc",
"test/headless_browser_test.h", "test/headless_browser_test.h",
"test/headless_client_browsertest.cc", "test/headless_client_browsertest.cc",
"test/headless_devtools_client_browsertest.cc",
"test/headless_origin_trials_browsertest.cc",
"test/headless_test_launcher.cc", "test/headless_test_launcher.cc",
"test/headless_web_contents_browsertest.cc",
"test/test_network_interceptor.cc", "test/test_network_interceptor.cc",
"test/test_network_interceptor.h", "test/test_network_interceptor.h",
] ]
...@@ -648,14 +648,14 @@ test("headless_browsertests") { ...@@ -648,14 +648,14 @@ test("headless_browsertests") {
} }
data = [ data = [
"lib/dom_tree_extraction_expected_nodes.txt", "test/data/",
"lib/dom_tree_extraction_expected_styles.txt", "test/dom_tree_extraction_expected_nodes.txt",
"test/dom_tree_extraction_expected_styles.txt",
"$root_out_dir/headless_lib.pak", "$root_out_dir/headless_lib.pak",
"//net/tools/testserver/", "//net/tools/testserver/",
"//third_party/blink/web_tests/http/tests/inspector-protocol/", "//third_party/blink/web_tests/http/tests/inspector-protocol/",
"//third_party/pywebsocket3/", "//third_party/pywebsocket3/",
"//third_party/tlslite/", "//third_party/tlslite/",
"test/data/",
] ]
if (is_mac) { if (is_mac) {
......
specific_include_rules = { specific_include_rules = {
"headless_browser_browsertest.cc": [
"+third_party/crashpad/crashpad/client",
],
"headless_browser_main_parts_linux.cc": [ "headless_browser_main_parts_linux.cc": [
"+device/bluetooth", "+device/bluetooth",
], ],
...@@ -13,15 +10,5 @@ specific_include_rules = { ...@@ -13,15 +10,5 @@ specific_include_rules = {
"+components/viz/common/switches.h", "+components/viz/common/switches.h",
"+gpu/config/gpu_switches.h", "+gpu/config/gpu_switches.h",
"+third_party/blink/public/common/switches.h", "+third_party/blink/public/common/switches.h",
],
"headless_web_contents_browsertest.cc": [
"+cc/base/switches.h",
"+cc/test",
"+components/viz/common/features.h",
"+components/viz/common/switches.h",
"+pdf",
"+printing",
"+third_party/blink/public/common/switches.h",
"+third_party/skia/include",
] ]
} }
specific_include_rules = { include_rules = [
"headless_compositor_browsertest.cc": [ "+cc/base/switches.h",
"+cc/base/switches.h", "+cc/test",
"+components/viz/common/switches.h", "+components/viz/common",
"+third_party/blink/public/common/switches.h", "+pdf",
] "+printing",
} "+third_party/blink/public",
"+third_party/crashpad/crashpad/client",
"+third_party/skia/include",
]
...@@ -919,7 +919,7 @@ class DomTreeExtractionBrowserTest : public HeadlessAsyncDevTooledBrowserTest, ...@@ -919,7 +919,7 @@ class DomTreeExtractionBrowserTest : public HeadlessAsyncDevTooledBrowserTest,
// Merge LayoutTreeNode data into the dictionary. // Merge LayoutTreeNode data into the dictionary.
if (base::Value* layout_node_index_value = if (base::Value* layout_node_index_value =
node_dict->FindKey("layoutNodeIndex")) { node_dict->FindKey("layoutNodeIndex")) {
int layout_node_index = layout_node_index_value->GetInt(); int layout_node_index = layout_node_index_value->GetInt();
ASSERT_LE(0, layout_node_index); ASSERT_LE(0, layout_node_index);
ASSERT_GT(result->GetLayoutTreeNodes()->size(), ASSERT_GT(result->GetLayoutTreeNodes()->size(),
...@@ -966,7 +966,7 @@ class DomTreeExtractionBrowserTest : public HeadlessAsyncDevTooledBrowserTest, ...@@ -966,7 +966,7 @@ class DomTreeExtractionBrowserTest : public HeadlessAsyncDevTooledBrowserTest,
base::PathService::Get(base::DIR_SOURCE_ROOT, &source_root_dir); base::PathService::Get(base::DIR_SOURCE_ROOT, &source_root_dir);
base::FilePath expected_dom_nodes_path = base::FilePath expected_dom_nodes_path =
source_root_dir.Append(FILE_PATH_LITERAL( source_root_dir.Append(FILE_PATH_LITERAL(
"headless/lib/dom_tree_extraction_expected_nodes.txt")); "headless/test/dom_tree_extraction_expected_nodes.txt"));
std::string expected_dom_nodes; std::string expected_dom_nodes;
ASSERT_TRUE( ASSERT_TRUE(
base::ReadFileToString(expected_dom_nodes_path, &expected_dom_nodes)); base::ReadFileToString(expected_dom_nodes_path, &expected_dom_nodes));
...@@ -988,7 +988,7 @@ class DomTreeExtractionBrowserTest : public HeadlessAsyncDevTooledBrowserTest, ...@@ -988,7 +988,7 @@ class DomTreeExtractionBrowserTest : public HeadlessAsyncDevTooledBrowserTest,
base::FilePath expected_styles_path = base::FilePath expected_styles_path =
source_root_dir.Append(FILE_PATH_LITERAL( source_root_dir.Append(FILE_PATH_LITERAL(
"headless/lib/dom_tree_extraction_expected_styles.txt")); "headless/test/dom_tree_extraction_expected_styles.txt"));
std::string expected_computed_styles; std::string expected_computed_styles;
ASSERT_TRUE(base::ReadFileToString(expected_styles_path, ASSERT_TRUE(base::ReadFileToString(expected_styles_path,
&expected_computed_styles)); &expected_computed_styles));
......
...@@ -991,9 +991,7 @@ class HeadlessWebContentsBeginFrameControlBasicTest ...@@ -991,9 +991,7 @@ class HeadlessWebContentsBeginFrameControlBasicTest
return "/blue_page.html"; return "/blue_page.html";
} }
void OnNeedsBeginFrame() override { void OnNeedsBeginFrame() override { BeginFrame(true); }
BeginFrame(true);
}
void OnFrameFinished(std::unique_ptr<headless_experimental::BeginFrameResult> void OnFrameFinished(std::unique_ptr<headless_experimental::BeginFrameResult>
result) override { result) override {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment