Commit 838863f5 authored by Javier Ernesto Flores Robles's avatar Javier Ernesto Flores Robles Committed by Commit Bot

[iOS][MF][EG2] Migrate Fallback JS test

Bug: 1017175, 1016367
Change-Id: I0c12c811c347a5f7981ea2985e550aad72167860
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1886860
Auto-Submit: Javier Ernesto Flores Robles <javierrobles@chromium.org>
Commit-Queue: Stepan Khapugin <stkhapugin@chromium.org>
Reviewed-by: default avatarStepan Khapugin <stkhapugin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#710344}
parent cd945638
......@@ -53,15 +53,11 @@ id<GREYMatcher> ProfileTableViewButtonMatcher() {
return grey_buttonTitle(@"Underworld");
}
// TODO(crbug.com/1016367): Remove the guard once ExecuteJavaScript is updated
// to compile on EG2.
#if defined(CHROME_EARL_GREY_1)
// Polls the JavaScript query |java_script_condition| until the returned
// |boolValue| is YES with a kWaitForActionTimeout timeout.
BOOL WaitForJavaScriptCondition(NSString* java_script_condition) {
auto verify_block = ^BOOL {
id boolValue =
chrome_test_util::ExecuteJavaScript(java_script_condition, nil);
id boolValue = [ChromeEarlGrey executeJavaScript:java_script_condition];
return [boolValue isEqual:@YES];
};
// NSTimeInterval timeout = base::test::ios::kWaitForActionTimeout;
......@@ -71,7 +67,6 @@ BOOL WaitForJavaScriptCondition(NSString* java_script_condition) {
block:verify_block];
return [condition waitWithTimeout:kWaitForActionTimeout];
}
#endif
// Undocks and split the keyboard by swiping it up. Does nothing if already
// undocked. Some devices, like iPhone or iPad Pro, do not allow undocking or
......@@ -178,9 +173,6 @@ BOOL WaitForKeyboardToAppear() {
[super tearDown];
}
// TODO(crbug.com/1016367): Remove the guard once ExecuteJavaScript is updated
// to compile on EG2.
#if defined(CHROME_EARL_GREY_1)
// Tests that the when tapping the outside the popover on iPad, suggestions
// continue working.
- (void)testIPadTappingOutsidePopOverResumesSuggestionsCorrectly {
......@@ -225,7 +217,6 @@ BOOL WaitForKeyboardToAppear() {
kFormElementName, name];
XCTAssertTrue(WaitForJavaScriptCondition(javaScriptCondition));
}
#endif // CHROME_EARL_GREY_1
// Tests that the manual fallback view concedes preference to the system picker
// for selection elements.
......
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