Commit ce74431b authored by Mike Dougherty's avatar Mike Dougherty Committed by Commit Bot

Convert InspectUITestCase tests to EarlGrey2

Bug: 987646
Change-Id: Ibdb5b6b7393fbdc3593c498d52f4d595872a3647
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1903839Reviewed-by: default avatarEugene But <eugenebut@chromium.org>
Commit-Queue: Mike Dougherty <michaeldo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#713654}
parent ca75f339
...@@ -121,6 +121,7 @@ source_set("webui_internal") { ...@@ -121,6 +121,7 @@ source_set("webui_internal") {
source_set("eg_tests") { source_set("eg_tests") {
configs += [ "//build/config/compiler:enable_arc" ] configs += [ "//build/config/compiler:enable_arc" ]
defines = [ "CHROME_EARL_GREY_1" ]
testonly = true testonly = true
sources = [ sources = [
"inspect/inspect_ui_egtest.mm", "inspect/inspect_ui_egtest.mm",
...@@ -135,6 +136,7 @@ source_set("eg_tests") { ...@@ -135,6 +136,7 @@ source_set("eg_tests") {
"//ios/chrome/browser/ui/omnibox:omnibox_internal", "//ios/chrome/browser/ui/omnibox:omnibox_internal",
"//ios/chrome/test/app:test_support", "//ios/chrome/test/app:test_support",
"//ios/chrome/test/earl_grey:test_support", "//ios/chrome/test/earl_grey:test_support",
"//ios/testing/earl_grey:earl_grey_support",
"//ios/web", "//ios/web",
"//ios/web/public/test:element_selector", "//ios/web/public/test:element_selector",
"//net:test_support", "//net:test_support",
...@@ -143,3 +145,25 @@ source_set("eg_tests") { ...@@ -143,3 +145,25 @@ source_set("eg_tests") {
] ]
libs = [ "XCTest.framework" ] libs = [ "XCTest.framework" ]
} }
source_set("eg2_tests") {
defines = [ "CHROME_EARL_GREY_2" ]
configs += [
"//build/config/compiler:enable_arc",
"//build/config/ios:xctest_config",
]
testonly = true
sources = [
"inspect/inspect_ui_egtest.mm",
]
deps = [
"//base",
"//ios/chrome/browser:chrome_url_constants",
"//ios/chrome/test/earl_grey:eg_test_support+eg2",
"//ios/testing/earl_grey:eg_test_support+eg2",
"//ios/third_party/earl_grey2:test_lib",
"//ios/web/public/test:element_selector",
"//net:test_support",
]
libs = [ "UIKit.framework" ]
}
...@@ -2,17 +2,16 @@ ...@@ -2,17 +2,16 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
#import <EarlGrey/EarlGrey.h>
#import <Foundation/Foundation.h> #import <Foundation/Foundation.h>
#import <XCTest/XCTest.h> #import <XCTest/XCTest.h>
#import "base/strings/sys_string_conversions.h" #import "base/strings/sys_string_conversions.h"
#include "ios/chrome/browser/chrome_url_constants.h" #include "ios/chrome/browser/chrome_url_constants.h"
#import "ios/chrome/test/app/tab_test_util.h"
#import "ios/chrome/test/earl_grey/chrome_actions.h" #import "ios/chrome/test/earl_grey/chrome_actions.h"
#import "ios/chrome/test/earl_grey/chrome_earl_grey.h" #import "ios/chrome/test/earl_grey/chrome_earl_grey.h"
#import "ios/chrome/test/earl_grey/chrome_matchers.h" #import "ios/chrome/test/earl_grey/chrome_matchers.h"
#import "ios/chrome/test/earl_grey/chrome_test_case.h" #import "ios/chrome/test/earl_grey/chrome_test_case.h"
#import "ios/testing/earl_grey/earl_grey_test.h"
#include "ios/web/public/test/element_selector.h" #include "ios/web/public/test/element_selector.h"
#include "net/test/embedded_test_server/embedded_test_server.h" #include "net/test/embedded_test_server/embedded_test_server.h"
...@@ -20,8 +19,6 @@ ...@@ -20,8 +19,6 @@
#error "This file requires ARC support." #error "This file requires ARC support."
#endif #endif
using chrome_test_util::GetCurrentWebState;
namespace { namespace {
// Directory containing the |kLogoPagePath| and |kLogoPageImageSourcePath| // Directory containing the |kLogoPagePath| and |kLogoPageImageSourcePath|
// resources. // resources.
......
...@@ -89,6 +89,7 @@ chrome_ios_eg2_test("ios_chrome_ui_eg2tests_module") { ...@@ -89,6 +89,7 @@ chrome_ios_eg2_test("ios_chrome_ui_eg2tests_module") {
"//ios/chrome/browser/ui/tab_grid:eg2_tests", "//ios/chrome/browser/ui/tab_grid:eg2_tests",
"//ios/chrome/browser/ui/tabs:eg2_tests", "//ios/chrome/browser/ui/tabs:eg2_tests",
"//ios/chrome/browser/ui/toolbar:eg2_tests", "//ios/chrome/browser/ui/toolbar:eg2_tests",
"//ios/chrome/browser/ui/webui:eg2_tests",
] ]
} }
......
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