Commit 5b08e216 authored by zhaoyangli's avatar zhaoyangli Committed by Commit Bot

[EG2] Migrate device check egtest to EG2 and create test suite.

Essential changes in test and BUILD.gn files.

Bug: 987646
Change-Id: I0db4f63318ddc6b72eb6d26a410600ffc3985aaf
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2027128
Commit-Queue: Zhaoyang Li <zhaoyangli@chromium.org>
Reviewed-by: default avatarEugene But <eugenebut@chromium.org>
Cr-Commit-Position: refs/heads/master@{#736541}
parent 18b6c323
......@@ -130,10 +130,12 @@ chrome_ios_eg_test("ios_chrome_perf_egtests") {
}
chrome_ios_eg_test("ios_chrome_device_check_egtests") {
defines = [ "CHROME_EARL_GREY_1" ]
configs += [ "//build/config/compiler:enable_arc" ]
sources = [ "device_check_egtest.mm" ]
deps = [
":test_support",
"//ios/testing/earl_grey:earl_grey_support",
"//ios/third_party/earl_grey:earl_grey+link",
"//url",
]
......@@ -169,6 +171,25 @@ chrome_ios_eg_test("ios_chrome_translate_egtests") {
deps = [ "//ios/chrome/browser/translate:eg_tests" ]
}
# This target is only used in routinely device checks. Thus, the target name is
# different from other EG2 tests.
source_set("device_check_eg2_tests") {
defines = [ "CHROME_EARL_GREY_2" ]
configs += [
"//build/config/compiler:enable_arc",
"//build/config/ios:xctest_config",
]
testonly = true
sources = [ "device_check_egtest.mm" ]
deps = [
":eg_test_support+eg2",
"//ios/testing/earl_grey:eg_test_support+eg2",
"//ios/third_party/earl_grey2:test_lib",
"//url",
]
libs = [ "UIKit.framework" ]
}
source_set("test_support") {
defines = [ "CHROME_EARL_GREY_1" ]
configs += [ "//build/config/compiler:enable_arc" ]
......
......@@ -2,11 +2,9 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#import <EarlGrey/EarlGrey.h>
#import <XCTest/XCTest.h>
#import "ios/chrome/test/earl_grey/chrome_earl_grey.h"
#import "ios/chrome/test/earl_grey/chrome_test_case.h"
#import "ios/testing/earl_grey/earl_grey_test.h"
#include "url/gurl.h"
#if !defined(__has_feature) || !__has_feature(objc_arc)
......
......@@ -11,6 +11,7 @@ group("all_tests") {
deps = [
":ios_chrome_autofill_automation_eg2tests_module",
":ios_chrome_bookmarks_eg2tests_module",
":ios_chrome_device_check_eg2tests_module",
":ios_chrome_eg2tests",
":ios_chrome_integration_eg2tests_module",
":ios_chrome_settings_eg2tests_module",
......@@ -35,6 +36,12 @@ chrome_ios_eg2_test("ios_chrome_bookmarks_eg2tests_module") {
deps = [ "//ios/chrome/browser/ui/bookmarks:eg2_tests" ]
}
chrome_ios_eg2_test("ios_chrome_device_check_eg2tests_module") {
xcode_test_application_name = "ios_chrome_eg2tests"
deps = [ "//ios/chrome/test/earl_grey:device_check_eg2_tests" ]
}
chrome_ios_eg2_test("ios_chrome_integration_eg2tests_module") {
xcode_test_application_name = "ios_chrome_eg2tests"
......
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