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

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

Issue 1988253002: Add web shell test to navigate with fragment link. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: make html more readable with single-quotes 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 | « no previous file | ios/web/shell/test/web_shell_navigation_egtest.mm » ('j') | 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/test/ios/wait_util.h" 8 #include "base/test/ios/wait_util.h"
9 #include "ios/testing/earl_grey/wait_util.h" 9 #include "ios/testing/earl_grey/wait_util.h"
10 #import "ios/web/public/web_state/web_state.h" 10 #import "ios/web/public/web_state/web_state.h"
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 if ([textField.text isEqualToString:text]) { 60 if ([textField.text isEqualToString:text]) {
61 return YES; 61 return YES;
62 } 62 }
63 base::test::ios::SpinRunLoopWithMaxDelay( 63 base::test::ios::SpinRunLoopWithMaxDelay(
64 base::TimeDelta::FromSecondsD(testing::kSpinDelaySeconds)); 64 base::TimeDelta::FromSecondsD(testing::kSpinDelaySeconds));
65 } 65 }
66 return NO; 66 return NO;
67 }; 67 };
68 68
69 DescribeToBlock describe = ^(id<GREYDescription> description) { 69 DescribeToBlock describe = ^(id<GREYDescription> description) {
70 [description appendText:@"web view containing "]; 70 [description appendText:@"address field containing "];
71 [description appendText:text]; 71 [description appendText:text];
72 }; 72 };
73 73
74 return [[[GREYElementMatcherBlock alloc] initWithMatchesBlock:matches 74 return [[[GREYElementMatcherBlock alloc] initWithMatchesBlock:matches
75 descriptionBlock:describe] 75 descriptionBlock:describe]
76 autorelease]; 76 autorelease];
77 } 77 }
78 78
79 + (id<GREYMatcher>)matcherForWebShellBackButton { 79 + (id<GREYMatcher>)matcherForWebShellBackButton {
80 return grey_accessibilityLabel(kWebShellBackButtonAccessibilityLabel); 80 return grey_accessibilityLabel(kWebShellBackButtonAccessibilityLabel);
81 } 81 }
82 82
83 + (id<GREYMatcher>)matcherForWebShellForwardButton { 83 + (id<GREYMatcher>)matcherForWebShellForwardButton {
84 return grey_accessibilityLabel(kWebShellForwardButtonAccessibilityLabel); 84 return grey_accessibilityLabel(kWebShellForwardButtonAccessibilityLabel);
85 } 85 }
86 86
87 + (id<GREYMatcher>)matcherForWebShellAddressField { 87 + (id<GREYMatcher>)matcherForWebShellAddressField {
88 return grey_accessibilityLabel(kWebShellAddressFieldAccessibilityLabel); 88 return grey_accessibilityLabel(kWebShellAddressFieldAccessibilityLabel);
89 } 89 }
90 90
91 @end 91 @end
OLDNEW
« no previous file with comments | « no previous file | ios/web/shell/test/web_shell_navigation_egtest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698