Commit be3a9821 authored by Justin Cohen's avatar Justin Cohen Committed by Commit Bot

[ios] Update wide pdf test for iOS12.

Swiping up on a short/wide pdf no longer hides the toolbar.

Also disable synchronization for testSmallWidePDFScroll on iOS12,
but it's likely something larger is going on.

Bug: 852393
Cq-Include-Trybots: luci.chromium.try:ios-simulator-full-configs;master.tryserver.chromium.mac:ios-simulator-cronet
Change-Id: Iab556064447cfe54cb498678d192a45f36b55a1a
Reviewed-on: https://chromium-review.googlesource.com/1100337
Commit-Queue: Justin Cohen <justincohen@chromium.org>
Reviewed-by: default avatarKurt Horimoto <kkhorimoto@chromium.org>
Cr-Commit-Position: refs/heads/master@{#567846}
parent 528c2aa1
...@@ -124,6 +124,14 @@ void AssertURLIs(const GURL& expectedURL) { ...@@ -124,6 +124,14 @@ void AssertURLIs(const GURL& expectedURL) {
"http://ios/testing/data/http_server_files/single_page_wide.pdf"); "http://ios/testing/data/http_server_files/single_page_wide.pdf");
[ChromeEarlGrey loadURL:URL]; [ChromeEarlGrey loadURL:URL];
// TODO(crbug.com/852393): Investigate why synchronization isn't working. Is
// an animation going on forever?
if (@available(iOS 12, *)) {
[[GREYConfiguration sharedInstance]
setValue:@NO
forConfigKey:kGREYConfigKeySynchronizationEnabled];
}
// Test that the toolbar is still visible after a user swipes down. // Test that the toolbar is still visible after a user swipes down.
[[EarlGrey [[EarlGrey
selectElementWithMatcher:WebViewScrollView( selectElementWithMatcher:WebViewScrollView(
...@@ -131,9 +139,23 @@ void AssertURLIs(const GURL& expectedURL) { ...@@ -131,9 +139,23 @@ void AssertURLIs(const GURL& expectedURL) {
performAction:grey_swipeFastInDirection(kGREYDirectionDown)]; performAction:grey_swipeFastInDirection(kGREYDirectionDown)];
[ChromeEarlGreyUI waitForToolbarVisible:YES]; [ChromeEarlGreyUI waitForToolbarVisible:YES];
// Test that the toolbar is no longer visible after a user swipes up. if (base::ios::IsRunningOnIOS12OrLater()) {
HideToolbarUsingUI(); // Test that the toolbar is still visible even after attempting to hide it
[ChromeEarlGreyUI waitForToolbarVisible:NO]; // on swipe up.
HideToolbarUsingUI();
[ChromeEarlGreyUI waitForToolbarVisible:YES];
} else {
// Test that the toolbar is no longer visible after a user swipes up.
HideToolbarUsingUI();
[ChromeEarlGreyUI waitForToolbarVisible:NO];
}
// Reenable synchronization.
if (@available(iOS 12, *)) {
[[GREYConfiguration sharedInstance]
setValue:@YES
forConfigKey:kGREYConfigKeySynchronizationEnabled];
}
} }
// Verifies that the toolbar properly appears/disappears when scrolling up/down // Verifies that the toolbar properly appears/disappears when scrolling up/down
......
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