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

Unified Diff: ios/testing/earl_grey/matchers.h

Issue 2275303004: Context menu egtests, plus related utilities. (Closed)
Patch Set: Fewer References. Created 4 years, 4 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/testing/earl_grey/BUILD.gn ('k') | ios/testing/earl_grey/matchers.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/testing/earl_grey/matchers.h
diff --git a/ios/testing/earl_grey/matchers.h b/ios/testing/earl_grey/matchers.h
new file mode 100644
index 0000000000000000000000000000000000000000..fe408104b1d88fdb20e7d608e9fca10cd74ba683
--- /dev/null
+++ b/ios/testing/earl_grey/matchers.h
@@ -0,0 +1,27 @@
+// 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_TESTING_EARL_GREY_MATCHERS_H_
+#define IOS_TESTING_EARL_GREY_MATCHERS_H_
+
+#import <Foundation/Foundation.h>
+
+#import <EarlGrey/EarlGrey.h>
+
+namespace testing {
+
+// Matcher for context menu item whose text is exactly |text|.
+id<GREYMatcher> contextMenuItemWithText(NSString* text);
+
+// Matcher for a UI element to tap to dismiss the the context menu, where
+// |cancel_text| is the localized text used for the action sheet cancel control.
+// On phones, where the context menu is an action sheet, this will be a matcher
+// for the menu item with |cancel_text| as its label.
+// On tablets, where the context menu is a popover, this will be a matcher for
+// some element outside of the popover.
+id<GREYMatcher> elementToDismissContextMenu(NSString* cancel_text);
+
+} // namespace testing
+
+#endif // IOS_TESTING_EARL_GREY_MATCHERS_H_
« no previous file with comments | « ios/testing/earl_grey/BUILD.gn ('k') | ios/testing/earl_grey/matchers.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698