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

Side by Side Diff: ios/web/shell/test/earl_grey/shell_matchers.mm

Issue 2008183004: Remove Earl Grey matcher APIs taking NSString. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 unified diff | Download patch
« no previous file with comments | « ios/web/shell/test/earl_grey/shell_matchers.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "ios/web/shell/test/earl_grey/shell_matchers.h" 5 #import "ios/web/shell/test/earl_grey/shell_matchers.h"
6 6
7 #import "base/mac/foundation_util.h" 7 #import "base/mac/foundation_util.h"
8 #include "base/strings/sys_string_conversions.h" 8 #include "base/strings/sys_string_conversions.h"
9 #include "base/test/ios/wait_util.h" 9 #include "base/test/ios/wait_util.h"
10 #include "ios/testing/earl_grey/wait_util.h" 10 #include "ios/testing/earl_grey/wait_util.h"
11 #import "ios/web/public/web_state/web_state.h" 11 #import "ios/web/public/web_state/web_state.h"
12 #import "ios/web/public/test/earl_grey/web_view_matchers.h" 12 #import "ios/web/public/test/earl_grey/web_view_matchers.h"
13 #import "ios/web/shell/test/app/web_shell_test_util.h" 13 #import "ios/web/shell/test/app/web_shell_test_util.h"
14 #import "ios/web/shell/view_controller.h" 14 #import "ios/web/shell/view_controller.h"
15 15
16 namespace web { 16 namespace web {
17 17
18 id<GREYMatcher> webViewContainingText(NSString* text) {
19 return [GREYMatchers
20 matcherForWebViewContainingText:base::SysNSStringToUTF8(text)];
21 }
22
23 id<GREYMatcher> addressFieldText(NSString* text) {
24 return [GREYMatchers
25 matcherForAddressFieldEqualToText:base::SysNSStringToUTF8(text)];
26 }
27
28 id<GREYMatcher> webViewContainingText(const std::string& text) { 18 id<GREYMatcher> webViewContainingText(const std::string& text) {
29 return [GREYMatchers matcherForWebViewContainingText:text]; 19 return [GREYMatchers matcherForWebViewContainingText:text];
30 } 20 }
31 21
32 id<GREYMatcher> addressFieldText(const std::string& text) { 22 id<GREYMatcher> addressFieldText(const std::string& text) {
33 return [GREYMatchers matcherForAddressFieldEqualToText:text]; 23 return [GREYMatchers matcherForAddressFieldEqualToText:text];
34 } 24 }
35 25
36 id<GREYMatcher> backButton() { 26 id<GREYMatcher> backButton() {
37 return [GREYMatchers matcherForWebShellBackButton]; 27 return [GREYMatchers matcherForWebShellBackButton];
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 82
93 + (id<GREYMatcher>)matcherForWebShellForwardButton { 83 + (id<GREYMatcher>)matcherForWebShellForwardButton {
94 return grey_accessibilityLabel(kWebShellForwardButtonAccessibilityLabel); 84 return grey_accessibilityLabel(kWebShellForwardButtonAccessibilityLabel);
95 } 85 }
96 86
97 + (id<GREYMatcher>)matcherForWebShellAddressField { 87 + (id<GREYMatcher>)matcherForWebShellAddressField {
98 return grey_accessibilityLabel(kWebShellAddressFieldAccessibilityLabel); 88 return grey_accessibilityLabel(kWebShellAddressFieldAccessibilityLabel);
99 } 89 }
100 90
101 @end 91 @end
OLDNEW
« no previous file with comments | « ios/web/shell/test/earl_grey/shell_matchers.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698