blob: a52d68dc48c27eed7283516491ab6e5a45ba3ef1 [file] [log] [blame]
# Copyright 2016 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.
import("//ios/build/config.gni")
import("//ios/third_party/earl_grey/ios_eg_test.gni")
import("//ios/third_party/earl_grey2/ios_eg2_test.gni")
group("all_tests") {
testonly = true
deps = [
":ios_web_shell_eg2tests",
":ios_web_shell_egtests",
":ios_web_shell_test_app_host",
]
}
ios_eg_test("ios_web_shell_egtests") {
info_plist = "//ios/web/shell/Info.plist"
sources = [
"context_menu_egtest.mm",
"page_state_egtest.mm",
"service_manager_egtest.mm",
]
deps = [
":earl_grey_test_support",
"//base",
"//base/test:test_support",
"//ios/testing/earl_grey:earl_grey_support",
"//ios/web",
"//ios/web:earl_grey_test_support",
"//ios/web/public/test",
"//ios/web/public/test/fakes",
"//ios/web/public/test/http_server",
"//ios/web/shell",
"//ios/web/shell:shell_interfaces",
"//net",
"//services/service_manager/public/cpp",
"//services/test/echo/public/mojom",
"//services/test/user_id/public/mojom",
"//url",
]
bundle_deps = [ ":bundle" ]
configs += [ "//build/config/compiler:enable_arc" ]
assert_no_deps = ios_assert_no_deps
}
source_set("earl_grey_test_support") {
defines = [ "CHROME_EARL_GREY_1" ]
testonly = true
deps = [
"//base",
"//base/test:test_support",
"//ios/testing/earl_grey:earl_grey_support",
"//ios/third_party/earl_grey:earl_grey+link",
"//ios/web",
"//ios/web:earl_grey_test_support",
"//ios/web/public/test",
"//ios/web/public/test/http_server",
"//ios/web/shell",
"//testing/gtest:gtest",
"//url",
]
public_deps = [
"//build/config/ios:xctest",
]
sources = [
"app/navigation_test_util.h",
"app/navigation_test_util.mm",
"app/web_shell_test_util.h",
"app/web_shell_test_util.mm",
"app/web_view_interaction_test_util.h",
"app/web_view_interaction_test_util.mm",
"earl_grey/shell_actions.h",
"earl_grey/shell_actions.mm",
"earl_grey/shell_earl_grey.h",
"earl_grey/shell_earl_grey.mm",
"earl_grey/shell_matchers.h",
"earl_grey/shell_matchers.mm",
"earl_grey/shell_matchers_shorthand.h",
"earl_grey/shell_matchers_shorthand.mm",
"earl_grey/web_shell_test_case.h",
"earl_grey/web_shell_test_case.mm",
]
configs += [ "//build/config/compiler:enable_arc" ]
}
bundle_data("bundle") {
visibility = [ ":*" ]
sources = [
"http_server_files/tall_page.html",
]
outputs = [
"{{bundle_resources_dir}}/{{source_root_relative_dir}}/" +
"{{source_file_part}}",
]
}
################################
# EG2 targets.
group("eg_app_support+eg2") {
testonly = true
}
source_set("eg_test_support+eg2") {
defines = [ "CHROME_EARL_GREY_2" ]
configs += [
"//build/config/compiler:enable_arc",
"//build/config/ios:xctest_config",
]
testonly = true
sources = [
"earl_grey/web_shell_test_case.h",
"earl_grey/web_shell_test_case.mm",
]
deps = [
"//ios/testing/earl_grey:eg_test_support+eg2",
"//ios/third_party/earl_grey2:test_lib",
"//ios/web/public/test/http_server",
]
}
source_set("eg_tests+eg2") {
configs += [
"//build/config/compiler:enable_arc",
"//build/config/ios:xctest_config",
]
testonly = true
sources = [
"web_shell_sample_egtest.mm",
]
deps = [
":eg_test_support+eg2",
"//ios/third_party/earl_grey2:test_lib",
]
libs = [ "UIKit.framework" ]
}
ios_eg2_test_app_host("ios_web_shell_test_app_host") {
info_plist = "//ios/web/shell/Info.plist"
deps = [
"//ios/web/shell",
# Test support libraries.
":eg_app_support+eg2",
"//ios/testing/earl_grey:eg_app_support+eg2",
]
}
ios_eg2_test("ios_web_shell_eg2tests") {
xcode_test_application_name = "ios_web_shell_test_app_host"
deps = [
# Test support libraries.
":eg_tests+eg2",
]
bundle_deps = [ ":bundle" ]
}