Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(260)

Unified Diff: ios/chrome/test/earl_grey/chrome_util.mm

Issue 2751523004: Move EarlGrey helper to check toolbar visibility into ChromeEarlGreyUI. (Closed)
Patch Set: return void Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ios/chrome/test/earl_grey/chrome_util.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/chrome/test/earl_grey/chrome_util.mm
diff --git a/ios/chrome/test/earl_grey/chrome_util.mm b/ios/chrome/test/earl_grey/chrome_util.mm
deleted file mode 100644
index 57c49fc732d47efada9a45769a8bcf5b3a6f62a7..0000000000000000000000000000000000000000
--- a/ios/chrome/test/earl_grey/chrome_util.mm
+++ /dev/null
@@ -1,56 +0,0 @@
-// Copyright 2016 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ios/chrome/test/earl_grey/chrome_util.h"
-
-#import <EarlGrey/EarlGrey.h>
-
-#import "ios/chrome/browser/ui/toolbar/toolbar_controller.h"
-#import "ios/chrome/test/app/chrome_test_util.h"
-#import "ios/testing/wait_util.h"
-#import "ios/web/public/test/earl_grey/web_view_matchers.h"
-
-#if !defined(__has_feature) || !__has_feature(objc_arc)
-#error "This file requires ARC support."
-#endif
-
-namespace {
-const NSTimeInterval kWaitForToolbarAnimationTimeout = 1.0;
-} // namespace
-
-namespace chrome_test_util {
-
-void AssertToolbarNotVisible() {
- ConditionBlock condition = ^{
- id<GREYMatcher> toolsMenuButton =
- grey_allOf(grey_accessibilityID(kToolbarToolsMenuButtonIdentifier),
- grey_sufficientlyVisible(), nil);
- NSError* error = nil;
- [[EarlGrey selectElementWithMatcher:toolsMenuButton]
- assertWithMatcher:grey_notNil()
- error:&error];
- return error != nil;
- };
- GREYAssert(testing::WaitUntilConditionOrTimeout(
- kWaitForToolbarAnimationTimeout, condition),
- @"The toolbar is still visible.");
-}
-
-void AssertToolbarVisible() {
- ConditionBlock condition = ^{
- id<GREYMatcher> toolsMenuButton =
- grey_allOf(grey_accessibilityID(kToolbarToolsMenuButtonIdentifier),
- grey_sufficientlyVisible(), nil);
- NSError* error = nil;
- [[EarlGrey selectElementWithMatcher:toolsMenuButton]
- assertWithMatcher:grey_notNil()
- error:&error];
- return error == nil;
- };
- GREYAssert(testing::WaitUntilConditionOrTimeout(
- kWaitForToolbarAnimationTimeout, condition),
- @"The toolbar is not visible.");
-}
-
-} // namespace chrome_test_util
« no previous file with comments | « ios/chrome/test/earl_grey/chrome_util.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698