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 #ifndef IOS_WEB_PUBLIC_TEST_EARL_GREY_WEB_VIEW_MATCHERS_H_ | |
6 #define IOS_WEB_PUBLIC_TEST_EARL_GREY_WEB_VIEW_MATCHERS_H_ | |
7 | |
5 #import <string> | 8 #import <string> |
Eugene But (OOO till 7-30)
2016/08/30 18:11:05
Optional NIT: Since you touching this, could you p
marq (ping after 24h)
2016/08/31 13:07:58
Done. Also made all the string params references.
Eugene But (OOO till 7-30)
2016/08/31 15:27:59
Moving to references will break tests.
| |
6 | 9 |
7 #import <EarlGrey/EarlGrey.h> | 10 #import <EarlGrey/EarlGrey.h> |
8 | 11 |
9 #import "ios/web/public/web_state/web_state.h" | 12 #import "ios/web/public/web_state/web_state.h" |
10 | 13 |
11 namespace web { | 14 namespace web { |
12 | 15 |
13 // Matcher for WKWebView which belogs to the given |webState|. | 16 // Matcher for WKWebView which belogs to the given |webState|. |
14 id<GREYMatcher> webViewInWebState(WebState* web_state); | 17 id<GREYMatcher> webViewInWebState(WebState* web_state); |
15 | 18 |
16 // Matcher for WKWebView containing |text|. | 19 // Matcher for WKWebView containing |text|. |
17 id<GREYMatcher> webViewContainingText(std::string text, WebState* web_state); | 20 id<GREYMatcher> webViewContainingText(std::string text, WebState* web_state); |
18 | 21 |
19 // Matcher for WKWebView containing a blocked |image_id|. When blocked, the | 22 // Matcher for WKWebView containing a blocked |image_id|. When blocked, the |
20 // image will be smaller than |expected_size|. | 23 // image will be smaller than |expected_size|. |
21 id<GREYMatcher> webViewContainingBlockedImage(std::string image_id, | 24 id<GREYMatcher> webViewContainingBlockedImage(std::string image_id, |
22 CGSize expected_size, | 25 CGSize expected_size, |
23 WebState* web_state); | 26 WebState* web_state); |
24 | 27 |
25 // Matcher for WKWebView containing an html element which matches |selector|. | 28 // Matcher for WKWebView containing an html element which matches |selector|. |
26 id<GREYMatcher> webViewCssSelector(std::string selector, WebState* web_state); | 29 id<GREYMatcher> webViewCssSelector(std::string selector, WebState* web_state); |
27 | 30 |
28 // Matcher for WKWebView's scroll view. | 31 // Matcher for WKWebView's scroll view. |
29 id<GREYMatcher> webViewScrollView(WebState* web_state); | 32 id<GREYMatcher> webViewScrollView(WebState* web_state); |
30 | 33 |
31 } // namespace web | 34 } // namespace web |
35 | |
36 #endif // IOS_WEB_PUBLIC_TEST_EARL_GREY_WEB_VIEW_MATCHERS_H_ | |
OLD | NEW |