Commit 98df8d13 authored by Eugene But's avatar Eugene But Committed by Commit Bot

Revert "Compile some ios_chrome_web_egtest files with EG2."

This reverts commit f7f90b37.

Reason for revert: crbug.com/968296

Original change's description:
> Compile some ios_chrome_web_egtest files with EG2.
> 
> This CL makes changes to the files, so they either compiled without (or
> with fewer) errors with EG2. Updated EG1 build target with proper EG1
> defined.
> 
> This CL does not add files to EG2 target, because tests are failing
> because of EG2 helper absence.
> 
> Bug: 922813
> Change-Id: I0fbb023d5861405a7324521c0f34f114ec29868e
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1632591
> Commit-Queue: Eugene But <eugenebut@chromium.org>
> Auto-Submit: Eugene But <eugenebut@chromium.org>
> Reviewed-by: Rohit Rao <rohitrao@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#663853}

TBR=rohitrao@chromium.org,eugenebut@chromium.org

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: 922813
Change-Id: I11bf5065050ce2eb6837001be0ba89472ed1e428
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1636922Reviewed-by: default avatarEugene But <eugenebut@chromium.org>
Commit-Queue: Eugene But <eugenebut@chromium.org>
Cr-Commit-Position: refs/heads/master@{#664630}
parent 9489bbc9
......@@ -317,7 +317,6 @@ source_set("unit_tests_internal") {
source_set("eg_tests") {
configs += [ "//build/config/compiler:enable_arc" ]
defines = [ "CHROME_EARL_GREY_1" ]
testonly = true
sources = [
"browsing_egtest.mm",
......
......@@ -2,13 +2,14 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#import <EarlGrey/EarlGrey.h>
#include "base/strings/sys_string_conversions.h"
#include "components/content_settings/core/common/content_settings.h"
#import "ios/chrome/test/earl_grey/chrome_earl_grey.h"
#import "ios/chrome/test/earl_grey/chrome_error_util.h"
#import "ios/chrome/test/earl_grey/chrome_matchers.h"
#import "ios/chrome/test/earl_grey/chrome_test_case.h"
#import "ios/testing/earl_grey/earl_grey_test.h"
#import "ios/web/public/test/http_server/http_server.h"
#include "ios/web/public/test/http_server/http_server_util.h"
......@@ -38,21 +39,8 @@ const char kWindow2Closed[] = "window2.closed: true";
@implementation ChildWindowOpenByDOMTestCase
#if defined(CHROME_EARL_GREY_2)
+ (void)setUpForTestCase {
[super setUpForTestCase];
[self setUpHelper];
}
#elif defined(CHROME_EARL_GREY_1)
+ (void)setUp {
[super setUp];
[self setUpHelper];
}
#else
#error Not an EarlGrey Test
#endif
+ (void)setUpHelper {
CHROME_EG_ASSERT_NO_ERROR(
[ChromeEarlGrey setContentSettings:CONTENT_SETTING_ALLOW]);
web::test::SetUpFileBasedHttpServer();
......
......@@ -2,6 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#import <EarlGrey/EarlGrey.h>
#include <functional>
#include <string>
......@@ -9,7 +11,6 @@
#import "ios/chrome/test/earl_grey/chrome_earl_grey.h"
#import "ios/chrome/test/earl_grey/chrome_error_util.h"
#import "ios/chrome/test/earl_grey/chrome_test_case.h"
#import "ios/testing/earl_grey/earl_grey_test.h"
#include "ios/testing/embedded_test_server_handlers.h"
#include "net/test/embedded_test_server/default_handlers.h"
#include "net/test/embedded_test_server/http_request.h"
......
......@@ -2,6 +2,7 @@
// 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>
#include <memory>
......@@ -18,7 +19,6 @@
#import "ios/chrome/test/earl_grey/chrome_error_util.h"
#import "ios/chrome/test/earl_grey/chrome_matchers.h"
#import "ios/chrome/test/earl_grey/chrome_test_case.h"
#import "ios/testing/earl_grey/earl_grey_test.h"
#import "ios/testing/earl_grey/matchers.h"
#import "ios/web/public/test/earl_grey/web_view_actions.h"
#import "ios/web/public/test/earl_grey/web_view_matchers.h"
......@@ -225,7 +225,7 @@ id<GREYMatcher> ResendPostButtonMatcher() {
// WKBasedNavigationManager presents repost confirmation dialog before loading
// stops.
if (web::GetWebClient()->IsSlimNavigationManagerEnabled()) {
[ChromeEarlGrey reload];
[chrome_test_util::BrowserCommandDispatcherForMainBVC() reload];
} else {
// Legacy navigation manager presents repost confirmation dialog after
// loading stops.
......@@ -262,7 +262,7 @@ id<GREYMatcher> ResendPostButtonMatcher() {
// [ChromeEarlGrey reload] because WKBasedNavigationManager presents repost
// confirmation dialog before loading stops.
if (web::GetWebClient()->IsSlimNavigationManagerEnabled()) {
[ChromeEarlGrey reload];
[chrome_test_util::BrowserCommandDispatcherForMainBVC() reload];
}
[self confirmResendWarning];
......@@ -294,7 +294,7 @@ id<GREYMatcher> ResendPostButtonMatcher() {
// [ChromeEarlGrey reload] because WKBasedNavigationManager presents repost
// confirmation dialog before loading stops.
if (web::GetWebClient()->IsSlimNavigationManagerEnabled()) {
[ChromeEarlGrey reload];
[chrome_test_util::BrowserCommandDispatcherForMainBVC() reload];
}
[self confirmResendWarning];
......@@ -360,7 +360,7 @@ id<GREYMatcher> ResendPostButtonMatcher() {
// [ChromeEarlGrey reload] because WKBasedNavigationManager presents repost
// confirmation dialog before loading stops.
if (web::GetWebClient()->IsSlimNavigationManagerEnabled()) {
[ChromeEarlGrey reload];
[chrome_test_util::BrowserCommandDispatcherForMainBVC() reload];
}
[[EarlGrey selectElementWithMatcher:ElementToDismissAlert(@"Cancel")]
......@@ -408,7 +408,7 @@ id<GREYMatcher> ResendPostButtonMatcher() {
// WKBasedNavigationManager presents repost confirmation dialog before loading
// stops.
if (web::GetWebClient()->IsSlimNavigationManagerEnabled()) {
[ChromeEarlGrey reload];
[chrome_test_util::BrowserCommandDispatcherForMainBVC() reload];
} else {
// Legacy navigation manager presents repost confirmation dialog after
// loading stops.
......
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