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

Unified Diff: ios/web/shell/test/earl_grey/shell_matchers.mm

Issue 2183583002: [ios] EarlGrey test for PDF Mime type. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@css_selector_matcher
Patch Set: Fixed dangling reference inside the block Created 4 years, 5 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 side-by-side diff with in-line comments
Download patch
Index: ios/web/shell/test/earl_grey/shell_matchers.mm
diff --git a/ios/web/shell/test/earl_grey/shell_matchers.mm b/ios/web/shell/test/earl_grey/shell_matchers.mm
index 055417cc4cfdd2b6e8c4d5e74c0fa1281aff7ebe..e88161c4d109bc198efc6c8813ccf2c4838c3f3f 100644
--- a/ios/web/shell/test/earl_grey/shell_matchers.mm
+++ b/ios/web/shell/test/earl_grey/shell_matchers.mm
@@ -27,6 +27,10 @@ id<GREYMatcher> webViewScrollView() {
return [GREYMatchers matcherForWebViewScrollView];
}
+id<GREYMatcher> webViewMimeType(const std::string& mime_type) {
+ return [GREYMatchers matcherForWebViewMIMETYPE:mime_type];
+}
+
id<GREYMatcher> addressFieldText(const std::string& text) {
return [GREYMatchers matcherForAddressFieldEqualToText:text];
}
@@ -61,6 +65,11 @@ id<GREYMatcher> addressField() {
return web::webViewScrollView(web::shell_test_util::GetCurrentWebState());
}
++ (id<GREYMatcher>)matcherForWebViewMIMEType:(const std::string&)MIMEType {
+ web::WebState* webState = web::shell_test_util::GetCurrentWebState();
+ return web::webViewMimeType(MIMEType, webState);
+}
+
+ (id<GREYMatcher>)matcherForAddressFieldEqualToText:(const std::string&)text {
MatchesBlock matches = ^BOOL(UIView* view) {
if (![view isKindOfClass:[UITextField class]]) {

Powered by Google App Engine
This is Rietveld 408576698