Chromium Code Reviews| 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 #import <string> |
| 6 | 6 |
| 7 #import <EarlGrey/EarlGrey.h> | 7 #import <EarlGrey/EarlGrey.h> |
| 8 | 8 |
| 9 namespace web { | 9 namespace web { |
| 10 | 10 |
| 11 // Shorthand for GREYMatchers::matcherForWebViewContainingText. | 11 // Shorthand for GREYMatchers::matcherForWebViewContainingText. |
| 12 id<GREYMatcher> webViewContainingText(const std::string& text); | 12 id<GREYMatcher> webViewContainingText(const std::string& text); |
| 13 | 13 |
| 14 // Shorthand for matcherForWebViewScrollView. | |
|
baxley
2016/07/20 15:27:25
nit: Could you add "GREYMatchers::", or remove it
Eugene But (OOO till 7-30)
2016/07/20 16:09:40
Done.
| |
| 15 id<GREYMatcher> webViewScrollView(); | |
| 16 | |
| 14 // Shorthand for GREYMatchers::matcherForAddressFieldEqualToText. | 17 // Shorthand for GREYMatchers::matcherForAddressFieldEqualToText. |
| 15 id<GREYMatcher> addressFieldText(const std::string& text); | 18 id<GREYMatcher> addressFieldText(const std::string& text); |
| 16 | 19 |
| 17 // Shorthand for GREYMatchers::matcherForBackButton. | 20 // Shorthand for GREYMatchers::matcherForBackButton. |
| 18 id<GREYMatcher> backButton(); | 21 id<GREYMatcher> backButton(); |
| 19 | 22 |
| 20 // Shorthand for GREYMatchers::matcherForForwardButton. | 23 // Shorthand for GREYMatchers::matcherForForwardButton. |
| 21 id<GREYMatcher> forwardButton(); | 24 id<GREYMatcher> forwardButton(); |
| 22 | 25 |
| 23 // Shorthand for GREYMatchers::matcherForAddressField. | 26 // Shorthand for GREYMatchers::matcherForAddressField. |
| 24 id<GREYMatcher> addressField(); | 27 id<GREYMatcher> addressField(); |
| 25 | 28 |
| 26 } // namespace web | 29 } // namespace web |
| 27 | 30 |
| 28 @interface GREYMatchers (WebShellAdditions) | 31 @interface GREYMatchers (WebShellAdditions) |
| 29 | 32 |
| 30 // Matcher for WKWebView containing |text|. | 33 // Matcher for WKWebView containing |text|. |
| 31 + (id<GREYMatcher>)matcherForWebViewContainingText:(const std::string&)text; | 34 + (id<GREYMatcher>)matcherForWebViewContainingText:(const std::string&)text; |
| 32 | 35 |
| 36 // Matcher for WKWebView's scroll view. | |
| 37 + (id<GREYMatcher>)matcherForWebViewScrollView; | |
| 38 | |
| 33 // Matcher for web shell address field text property equal to |text|. | 39 // Matcher for web shell address field text property equal to |text|. |
| 34 + (id<GREYMatcher>)matcherForAddressFieldEqualToText:(const std::string&)text; | 40 + (id<GREYMatcher>)matcherForAddressFieldEqualToText:(const std::string&)text; |
| 35 | 41 |
| 36 // Matcher for back button in web shell. | 42 // Matcher for back button in web shell. |
| 37 + (id<GREYMatcher>)matcherForWebShellBackButton; | 43 + (id<GREYMatcher>)matcherForWebShellBackButton; |
| 38 | 44 |
| 39 // Matcher for forward button in web shell. | 45 // Matcher for forward button in web shell. |
| 40 + (id<GREYMatcher>)matcherForWebShellForwardButton; | 46 + (id<GREYMatcher>)matcherForWebShellForwardButton; |
| 41 | 47 |
| 42 // Matcher for address field in web shell. | 48 // Matcher for address field in web shell. |
| 43 + (id<GREYMatcher>)matcherForWebShellAddressField; | 49 + (id<GREYMatcher>)matcherForWebShellAddressField; |
| 44 | 50 |
| 45 @end | 51 @end |
| OLD | NEW |