Commit d83964ae authored by Rohit Rao's avatar Rohit Rao Committed by Commit Bot

[ios] Fixes NavigationTestCase.testHistoryForwardNavigation.

This test was assuming that the forward button was always hidden when disabled
on phone, but that is no longer true when the UIRefresh flag is enabled.

BUG=818737
TEST=None

Cq-Include-Trybots: master.tryserver.chromium.mac:ios-simulator-cronet;master.tryserver.chromium.mac:ios-simulator-full-configs
Change-Id: I134e3709c14d33c53f5506fe94c99729bfbf85e5
Reviewed-on: https://chromium-review.googlesource.com/1016661Reviewed-by: default avatarGauthier Ambard <gambard@chromium.org>
Commit-Queue: Rohit Rao <rohitrao@chromium.org>
Cr-Commit-Position: refs/heads/master@{#551660}
parent ab7f42aa
......@@ -5,6 +5,7 @@
#import <XCTest/XCTest.h>
#include "components/strings/grit/components_strings.h"
#import "ios/chrome/browser/ui/ui_util.h"
#import "ios/chrome/browser/ui/uikit_ui_util.h"
#import "ios/chrome/test/app/chrome_test_util.h"
#import "ios/chrome/test/app/web_view_interaction_test_util.h"
......@@ -308,13 +309,12 @@ std::unique_ptr<net::test_server::HttpResponse> WindowLocationHashHandlers(
assertWithMatcher:grey_notNil()];
// Verify that the forward button is not enabled.
if (IsCompactWidth()) {
// In horizontally compact environments, the forward button is not visible.
if (!IsUIRefreshPhase1Enabled() && IsCompactWidth()) {
// The forward button is not visible.
[[EarlGrey selectElementWithMatcher:ForwardButton()]
assertWithMatcher:grey_nil()];
} else {
// In horizontally regular environments, the forward button is visible and
// disabled.
// The forward button is visible and disabled.
id<GREYMatcher> disabledForwardButton = grey_allOf(
ForwardButton(),
grey_accessibilityTrait(UIAccessibilityTraitNotEnabled), nil);
......
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