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

Unified Diff: ios/chrome/test/earl_grey/chrome_matchers.h

Issue 2580333003: Upstream Chrome on iOS source code [10/11]. (Closed)
Patch Set: Created 4 years 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_earl_grey_ui.mm ('k') | ios/chrome/test/earl_grey/chrome_matchers.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/chrome/test/earl_grey/chrome_matchers.h
diff --git a/ios/chrome/test/earl_grey/chrome_matchers.h b/ios/chrome/test/earl_grey/chrome_matchers.h
new file mode 100644
index 0000000000000000000000000000000000000000..9c01844f0aaca3247d316ff073f828d66b0795bd
--- /dev/null
+++ b/ios/chrome/test/earl_grey/chrome_matchers.h
@@ -0,0 +1,80 @@
+// 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.
+
+#ifndef IOS_CHROME_TEST_EARL_GREY_CHROME_MATCHERS_H_
+#define IOS_CHROME_TEST_EARL_GREY_CHROME_MATCHERS_H_
+
+#include <string>
+
+#import <EarlGrey/EarlGrey.h>
+
+namespace chrome_test_util {
+
+// Matcher for element with accessbitility label corresponding to |message_id|
+// and acessibility trait UIAccessibilityTraitButton.
+id<GREYMatcher> buttonWithAccessibilityLabelId(int message_id);
+
+// Matcher for element with accessbitility label corresponding to |label| and
+// acessibility trait UIAccessibilityTraitButton.
+id<GREYMatcher> buttonWithAccessibilityLabel(NSString* label);
+
+// Matcher for element with accessbitility label corresponding to |message_id|
+// and acessibility trait UIAccessibilityTraitStaticText.
+id<GREYMatcher> staticTextWithAccessibilityLabelId(int message_id);
+
+// Matcher for element with accessbitility label corresponding to |label| and
+// acessibility trait UIAccessibilityTraitStaticText.
+id<GREYMatcher> staticTextWithAccessibilityLabel(NSString* label);
+
+// Returns matcher for webview owned by a web controller.
+id<GREYMatcher> webViewBelongingToWebController();
+
+// Returns matcher for webview containing |text|.
+id<GREYMatcher> webViewContainingText(std::string text);
+
+// Returns matcher for webview not containing |text|.
+id<GREYMatcher> webViewNotContainingText(std::string text);
+
+// Matcher for WKWebView containing a blocked |image_id|. When blocked, the
+// image element will be smaller than actual image.
+id<GREYMatcher> webViewContainingBlockedImage(std::string image_id);
+
+// Returns matcher for a StaticHtmlViewController containing |text|.
+id<GREYMatcher> staticHtmlViewContainingText(NSString* text);
+
+// Matcher for the navigate forward button.
+id<GREYMatcher> forwardButton();
+
+// Matcher for the navigate backward button.
+id<GREYMatcher> backButton();
+
+// Matcher for the reload button.
+id<GREYMatcher> reloadButton();
+
+// Matcher for the stop loading button.
+id<GREYMatcher> stopButton();
+
+// Returns a matcher for the omnibox.
+id<GREYMatcher> omnibox();
+
+// Returns a matcher for the page security info button.
+id<GREYMatcher> pageSecurityInfoButton();
+
+// Returns matcher for omnibox containing |text|. Performs an exact match of the
+// omnibox contents.
+id<GREYMatcher> omniboxText(std::string text);
+
+// Matcher for Tools menu button.
+id<GREYMatcher> toolsMenuButton();
+
+// Matcher for show tabs button.
+id<GREYMatcher> showTabsButton();
+
+// Matcher for CollectionViewSwitchCell.
+id<GREYMatcher> collectionViewSwitchCell(NSString* accessibilityIdentifier,
+ BOOL isOn);
+
+} // namespace chrome_test_util
+
+#endif // IOS_CHROME_TEST_EARL_GREY_CHROME_MATCHERS_H_
« no previous file with comments | « ios/chrome/test/earl_grey/chrome_earl_grey_ui.mm ('k') | ios/chrome/test/earl_grey/chrome_matchers.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698