OLD | NEW |
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 #import <string> | 5 #ifndef IOS_WEB_SHELL_TEST_EARL_GREY_SHELL_MATCHERS_H_ |
| 6 #define IOS_WEB_SHELL_TEST_EARL_GREY_SHELL_MATCHERS_H_ |
| 7 |
| 8 #include <string> |
6 | 9 |
7 #import <EarlGrey/EarlGrey.h> | 10 #import <EarlGrey/EarlGrey.h> |
8 | 11 |
9 namespace web { | 12 namespace web { |
10 | 13 |
11 // Matcher for WKWebView containing |text|. | 14 // Matcher for WKWebView containing |text|. |
12 id<GREYMatcher> webViewContainingText(std::string text); | 15 id<GREYMatcher> webViewContainingText(const std::string& text); |
13 | 16 |
14 // Matcher for WKWebView containing an html element which matches |selector|. | 17 // Matcher for WKWebView containing an html element which matches |selector|. |
15 id<GREYMatcher> webViewCssSelector(std::string selector); | 18 id<GREYMatcher> webViewCssSelector(const std::string& selector); |
| 19 |
| 20 // Matcher for the WKWebView. |
| 21 id<GREYMatcher> webView(); |
16 | 22 |
17 // Matcher for WKWebView's scroll view. | 23 // Matcher for WKWebView's scroll view. |
18 id<GREYMatcher> webViewScrollView(); | 24 id<GREYMatcher> webViewScrollView(); |
19 | 25 |
20 // Matcher for web shell address field text property equal to |text|. | 26 // Matcher for web shell address field text property equal to |text|. |
21 id<GREYMatcher> addressFieldText(std::string text); | 27 id<GREYMatcher> addressFieldText(std::string text); |
22 | 28 |
23 // Matcher for back button in web shell. | 29 // Matcher for back button in web shell. |
24 id<GREYMatcher> backButton(); | 30 id<GREYMatcher> backButton(); |
25 | 31 |
26 // Matcher for forward button in web shell. | 32 // Matcher for forward button in web shell. |
27 id<GREYMatcher> forwardButton(); | 33 id<GREYMatcher> forwardButton(); |
28 | 34 |
29 // Matcher for address field in web shell. | 35 // Matcher for address field in web shell. |
30 id<GREYMatcher> addressField(); | 36 id<GREYMatcher> addressField(); |
31 | 37 |
32 } // namespace web | 38 } // namespace web |
| 39 |
| 40 #endif // IOS_WEB_SHELL_TEST_EARL_GREY_SHELL_MATCHERS_H_ |
OLD | NEW |