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

Side by Side Diff: ios/chrome/test/earl_grey/chrome_matchers.h

Issue 2642193012: Make EarlGrey matchers compliant with Chromium style. (Closed)
Patch Set: build.gn and rebase Created 3 years, 11 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef IOS_CHROME_TEST_EARL_GREY_CHROME_MATCHERS_H_ 5 #ifndef IOS_CHROME_TEST_EARL_GREY_CHROME_MATCHERS_H_
6 #define IOS_CHROME_TEST_EARL_GREY_CHROME_MATCHERS_H_ 6 #define IOS_CHROME_TEST_EARL_GREY_CHROME_MATCHERS_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #import <EarlGrey/EarlGrey.h> 10 #import <EarlGrey/EarlGrey.h>
11 11
12 namespace chrome_test_util { 12 namespace chrome_test_util {
13 13
14 // Matcher for element with accessbitility label corresponding to |message_id| 14 // Matcher for element with accessbitility label corresponding to |message_id|
15 // and acessibility trait UIAccessibilityTraitButton. 15 // and acessibility trait UIAccessibilityTraitButton.
16 id<GREYMatcher> buttonWithAccessibilityLabelId(int message_id); 16 id<GREYMatcher> ButtonWithAccessibilityLabelId(int message_id);
17 17
18 // Matcher for element with accessbitility label corresponding to |label| and 18 // Matcher for element with accessbitility label corresponding to |label| and
19 // acessibility trait UIAccessibilityTraitButton. 19 // acessibility trait UIAccessibilityTraitButton.
20 id<GREYMatcher> buttonWithAccessibilityLabel(NSString* label); 20 id<GREYMatcher> ButtonWithAccessibilityLabel(NSString* label);
21 21
22 // Matcher for element with accessbitility label corresponding to |message_id| 22 // Matcher for element with accessbitility label corresponding to |message_id|
23 // and acessibility trait UIAccessibilityTraitStaticText. 23 // and acessibility trait UIAccessibilityTraitStaticText.
24 id<GREYMatcher> staticTextWithAccessibilityLabelId(int message_id); 24 id<GREYMatcher> StaticTextWithAccessibilityLabelId(int message_id);
25 25
26 // Matcher for element with accessbitility label corresponding to |label| and 26 // Matcher for element with accessbitility label corresponding to |label| and
27 // acessibility trait UIAccessibilityTraitStaticText. 27 // acessibility trait UIAccessibilityTraitStaticText.
28 id<GREYMatcher> staticTextWithAccessibilityLabel(NSString* label); 28 id<GREYMatcher> StaticTextWithAccessibilityLabel(NSString* label);
29
30 // Returns matcher for webview owned by a web controller.
31 id<GREYMatcher> webViewBelongingToWebController();
32 29
33 // Returns matcher for webview containing |text|. 30 // Returns matcher for webview containing |text|.
34 id<GREYMatcher> webViewContainingText(std::string text); 31 id<GREYMatcher> WebViewContainingText(std::string text);
35 32
36 // Returns matcher for webview not containing |text|. 33 // Returns matcher for webview not containing |text|.
37 id<GREYMatcher> webViewNotContainingText(std::string text); 34 id<GREYMatcher> WebViewNotContainingText(std::string text);
38 35
39 // Returns matcher for a StaticHtmlViewController containing |text|. 36 // Returns matcher for a StaticHtmlViewController containing |text|.
40 id<GREYMatcher> staticHtmlViewContainingText(NSString* text); 37 id<GREYMatcher> StaticHtmlViewContainingText(NSString* text);
41 38
42 // Returns matcher for a cancel button. 39 // Returns matcher for a cancel button.
43 id<GREYMatcher> cancelButton(); 40 id<GREYMatcher> CancelButton();
44 41
45 // Matcher for the navigate forward button. 42 // Matcher for the navigate forward button.
46 id<GREYMatcher> forwardButton(); 43 id<GREYMatcher> ForwardButton();
47 44
48 // Matcher for the navigate backward button. 45 // Matcher for the navigate backward button.
49 id<GREYMatcher> backButton(); 46 id<GREYMatcher> BackButton();
50 47
51 // Matcher for the reload button. 48 // Matcher for the reload button.
52 id<GREYMatcher> reloadButton(); 49 id<GREYMatcher> ReloadButton();
53 50
54 // Matcher for the stop loading button. 51 // Matcher for the stop loading button.
55 id<GREYMatcher> stopButton(); 52 id<GREYMatcher> StopButton();
56 53
57 // Returns a matcher for the omnibox. 54 // Returns a matcher for the omnibox.
58 id<GREYMatcher> omnibox(); 55 id<GREYMatcher> Omnibox();
59 56
60 // Returns a matcher for the page security info button. 57 // Returns a matcher for the page security info button.
61 id<GREYMatcher> pageSecurityInfoButton(); 58 id<GREYMatcher> PageSecurityInfoButton();
62 59
63 // Returns matcher for omnibox containing |text|. Performs an exact match of the 60 // Returns matcher for omnibox containing |text|. Performs an exact match of the
64 // omnibox contents. 61 // omnibox contents.
65 id<GREYMatcher> omniboxText(std::string text); 62 id<GREYMatcher> OmniboxText(std::string text);
66 63
67 // Matcher for Tools menu button. 64 // Matcher for Tools menu button.
68 id<GREYMatcher> toolsMenuButton(); 65 id<GREYMatcher> ToolsMenuButton();
69 66
70 // Matcher for the Share menu button. 67 // Matcher for the Share menu button.
71 id<GREYMatcher> shareButton(); 68 id<GREYMatcher> ShareButton();
72 69
73 // Matcher for show tabs button. 70 // Matcher for show tabs button.
74 id<GREYMatcher> showTabsButton(); 71 id<GREYMatcher> ShowTabsButton();
75 72
76 // Matcher for CollectionViewSwitchCell. 73 // Matcher for CollectionViewSwitchCell.
77 id<GREYMatcher> collectionViewSwitchCell(NSString* accessibilityIdentifier, 74 // TODO(crbug.com/684139): Update |isOn| to something more obvious from
75 // callsites.
76 id<GREYMatcher> CollectionViewSwitchCell(NSString* accessibilityIdentifier,
78 BOOL isOn); 77 BOOL isOn);
79 78
80 } // namespace chrome_test_util 79 } // namespace chrome_test_util
81 80
82 #endif // IOS_CHROME_TEST_EARL_GREY_CHROME_MATCHERS_H_ 81 #endif // IOS_CHROME_TEST_EARL_GREY_CHROME_MATCHERS_H_
OLDNEW
« 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