| 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_ | 5 #ifndef IOS_WEB_PUBLIC_TEST_EARL_GREY_WEB_VIEW_MATCHERS_H_ |
| 6 #define IOS_WEB_PUBLIC_TEST_EARL_GREY_WEB_VIEW_MATCHERS_H_ | 6 #define IOS_WEB_PUBLIC_TEST_EARL_GREY_WEB_VIEW_MATCHERS_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #import <EarlGrey/EarlGrey.h> | 10 #import <EarlGrey/EarlGrey.h> |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 // that a visible WKWebView does not contain |text|, rather than verifying that | 23 // that a visible WKWebView does not contain |text|, rather than verifying that |
| 24 // a WKWebView containing |text| is not visible, as would be the case if | 24 // a WKWebView containing |text| is not visible, as would be the case if |
| 25 // webViewContainingText() were asserted with grey_nil(). | 25 // webViewContainingText() were asserted with grey_nil(). |
| 26 id<GREYMatcher> webViewNotContainingText(std::string text, WebState* web_state); | 26 id<GREYMatcher> webViewNotContainingText(std::string text, WebState* web_state); |
| 27 | 27 |
| 28 // Matcher for WKWebView containing a blocked |image_id|. When blocked, the | 28 // Matcher for WKWebView containing a blocked |image_id|. When blocked, the |
| 29 // image element will be smaller actual image size. | 29 // image element will be smaller actual image size. |
| 30 id<GREYMatcher> webViewContainingBlockedImage(std::string image_id, | 30 id<GREYMatcher> webViewContainingBlockedImage(std::string image_id, |
| 31 WebState* web_state); | 31 WebState* web_state); |
| 32 | 32 |
| 33 // Matcher for WKWebView containing a blocked |image_id|. When blocked, the | |
| 34 // image will be smaller than |expected_size|. | |
| 35 // Note: deprecated. Use webViewContainingBlockedImage(std::string, WebState*) | |
| 36 // instead. TODO(crbug.com/673520): Remove this method. | |
| 37 id<GREYMatcher> webViewContainingBlockedImage(std::string image_id, | |
| 38 CGSize expected_size, | |
| 39 WebState* web_state); | |
| 40 | |
| 41 // Matcher for WKWebView containing an html element which matches |selector|. | 33 // Matcher for WKWebView containing an html element which matches |selector|. |
| 42 id<GREYMatcher> webViewCssSelector(std::string selector, WebState* web_state); | 34 id<GREYMatcher> webViewCssSelector(std::string selector, WebState* web_state); |
| 43 | 35 |
| 44 // Matcher for WKWebView's scroll view. | 36 // Matcher for WKWebView's scroll view. |
| 45 id<GREYMatcher> webViewScrollView(WebState* web_state); | 37 id<GREYMatcher> webViewScrollView(WebState* web_state); |
| 46 | 38 |
| 47 // Matcher for an interstitial page. Does not wait if the page is not displayed. | 39 // Matcher for an interstitial page. Does not wait if the page is not displayed. |
| 48 id<GREYMatcher> interstitial(WebState* web_state); | 40 id<GREYMatcher> interstitial(WebState* web_state); |
| 49 | 41 |
| 50 // Matcher for interstitial page containing |text|. Waits until the text is | 42 // Matcher for interstitial page containing |text|. Waits until the text is |
| 51 // displayed or timed out. | 43 // displayed or timed out. |
| 52 id<GREYMatcher> interstitialContainingText(NSString* text, WebState* web_state); | 44 id<GREYMatcher> interstitialContainingText(NSString* text, WebState* web_state); |
| 53 | 45 |
| 54 } // namespace web | 46 } // namespace web |
| 55 | 47 |
| 56 #endif // IOS_WEB_PUBLIC_TEST_EARL_GREY_WEB_VIEW_MATCHERS_H_ | 48 #endif // IOS_WEB_PUBLIC_TEST_EARL_GREY_WEB_VIEW_MATCHERS_H_ |
| OLD | NEW |