Commit 6f6a454a authored by Mike Baxley's avatar Mike Baxley Committed by Commit Bot

Use IsCompact in navigation_egtest.mm.

Remove logic that manually verifies the size class, and use the
utility method that does it.

Bug: 638674
Cq-Include-Trybots: master.tryserver.chromium.mac:ios-simulator-cronet;master.tryserver.chromium.mac:ios-simulator-full-configs
Change-Id: I6f7568a8d0dde822db1c1e496dd36de0344d04db
Reviewed-on: https://chromium-review.googlesource.com/806235Reviewed-by: default avatarEugene But <eugenebut@chromium.org>
Commit-Queue: Mike Baxley <baxley@chromium.org>
Cr-Commit-Position: refs/heads/master@{#521387}
parent 1ee38359
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
#include "base/ios/ios_util.h" #include "base/ios/ios_util.h"
#include "components/strings/grit/components_strings.h" #include "components/strings/grit/components_strings.h"
#include "ios/chrome/browser/ui/ui_util.h" #import "ios/chrome/browser/ui/uikit_ui_util.h"
#include "ios/chrome/test/app/web_view_interaction_test_util.h" #include "ios/chrome/test/app/web_view_interaction_test_util.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"
...@@ -305,10 +305,7 @@ std::unique_ptr<net::test_server::HttpResponse> WindowLocationHashHandlers( ...@@ -305,10 +305,7 @@ std::unique_ptr<net::test_server::HttpResponse> WindowLocationHashHandlers(
assertWithMatcher:grey_notNil()]; assertWithMatcher:grey_notNil()];
// Verify that the forward button is not enabled. // Verify that the forward button is not enabled.
// TODO(crbug.com/638674): Evaluate if size class determination can move to if (IsCompact()) {
// shared code.
if (UIApplication.sharedApplication.keyWindow.traitCollection
.horizontalSizeClass == UIUserInterfaceSizeClassCompact) {
// In horizontally compact environments, the forward button is not visible. // In horizontally compact environments, the forward button is not visible.
[[EarlGrey selectElementWithMatcher:ForwardButton()] [[EarlGrey selectElementWithMatcher:ForwardButton()]
assertWithMatcher:grey_nil()]; assertWithMatcher:grey_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