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

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

Issue 2642193012: Make EarlGrey matchers compliant with Chromium style. (Closed)
Patch Set: mistake 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 29
30 // Returns matcher for webview owned by a web controller. 30 // Returns matcher for webview owned by a web controller.
31 id<GREYMatcher> webViewBelongingToWebController(); 31 id<GREYMatcher> WebViewBelongingToWebController();
Eugene But (OOO till 7-30) 2017/01/23 19:39:04 Please remove this instead of fixing it's name.
baxley 2017/01/24 22:18:50 Done.
32 32
33 // Returns matcher for webview containing |text|. 33 // Returns matcher for webview containing |text|.
34 id<GREYMatcher> webViewContainingText(std::string text); 34 id<GREYMatcher> WebViewContainingText(std::string text);
35 35
36 // Returns matcher for webview not containing |text|. 36 // Returns matcher for webview not containing |text|.
37 id<GREYMatcher> webViewNotContainingText(std::string text); 37 id<GREYMatcher> WebViewNotContainingText(std::string text);
38 38
39 // Returns matcher for a StaticHtmlViewController containing |text|. 39 // Returns matcher for a StaticHtmlViewController containing |text|.
40 id<GREYMatcher> staticHtmlViewContainingText(NSString* text); 40 id<GREYMatcher> StaticHtmlViewContainingText(NSString* text);
41 41
42 // Returns matcher for a cancel button. 42 // Returns matcher for a cancel button.
43 id<GREYMatcher> cancelButton(); 43 id<GREYMatcher> CancelButton();
44 44
45 // Matcher for the navigate forward button. 45 // Matcher for the navigate forward button.
46 id<GREYMatcher> forwardButton(); 46 id<GREYMatcher> ForwardButton();
47 47
48 // Matcher for the navigate backward button. 48 // Matcher for the navigate backward button.
49 id<GREYMatcher> backButton(); 49 id<GREYMatcher> BackButton();
50 50
51 // Matcher for the reload button. 51 // Matcher for the reload button.
52 id<GREYMatcher> reloadButton(); 52 id<GREYMatcher> ReloadButton();
53 53
54 // Matcher for the stop loading button. 54 // Matcher for the stop loading button.
55 id<GREYMatcher> stopButton(); 55 id<GREYMatcher> StopButton();
56 56
57 // Returns a matcher for the omnibox. 57 // Returns a matcher for the omnibox.
58 id<GREYMatcher> omnibox(); 58 id<GREYMatcher> Omnibox();
59 59
60 // Returns a matcher for the page security info button. 60 // Returns a matcher for the page security info button.
61 id<GREYMatcher> pageSecurityInfoButton(); 61 id<GREYMatcher> PageSecurityInfoButton();
62 62
63 // Returns matcher for omnibox containing |text|. Performs an exact match of the 63 // Returns matcher for omnibox containing |text|. Performs an exact match of the
64 // omnibox contents. 64 // omnibox contents.
65 id<GREYMatcher> omniboxText(std::string text); 65 id<GREYMatcher> OmniboxText(std::string text);
66 66
67 // Matcher for Tools menu button. 67 // Matcher for Tools menu button.
68 id<GREYMatcher> toolsMenuButton(); 68 id<GREYMatcher> ToolsMenuButton();
69 69
70 // Matcher for the Share menu button. 70 // Matcher for the Share menu button.
71 id<GREYMatcher> shareButton(); 71 id<GREYMatcher> ShareButton();
72 72
73 // Matcher for show tabs button. 73 // Matcher for show tabs button.
74 id<GREYMatcher> showTabsButton(); 74 id<GREYMatcher> ShowTabsButton();
75 75
76 // Matcher for CollectionViewSwitchCell. 76 // Matcher for CollectionViewSwitchCell.
77 id<GREYMatcher> collectionViewSwitchCell(NSString* accessibilityIdentifier, 77 id<GREYMatcher> CollectionViewSwitchCell(NSString* accessibilityIdentifier,
78 BOOL isOn); 78 BOOL isOn);
Eugene But (OOO till 7-30) 2017/01/23 19:39:04 Could you please file a bug to replace BOOL param
baxley 2017/01/24 22:18:50 Done.
79 79
80 } // namespace chrome_test_util 80 } // namespace chrome_test_util
81 81
82 #endif // IOS_CHROME_TEST_EARL_GREY_CHROME_MATCHERS_H_ 82 #endif // IOS_CHROME_TEST_EARL_GREY_CHROME_MATCHERS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698