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

Unified Diff: ios/web/public/test/earl_grey/web_view_matchers.mm

Issue 1961063002: Add web shell matcher for address field. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: s/Element/UIElement 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ios/web/ios_web_shell_tests.gyp ('k') | ios/web/shell/test/earl_grey/shell_matchers.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/web/public/test/earl_grey/web_view_matchers.mm
diff --git a/ios/web/public/test/earl_grey/web_view_matchers.mm b/ios/web/public/test/earl_grey/web_view_matchers.mm
index 8e50a147412dba6d088fae641acfde312b22f293..d78daa208a2f36d7fdde2931315f1ea3b538b89c 100644
--- a/ios/web/public/test/earl_grey/web_view_matchers.mm
+++ b/ios/web/public/test/earl_grey/web_view_matchers.mm
@@ -11,15 +11,10 @@
#include "base/strings/utf_string_conversions.h"
#include "base/test/ios/wait_util.h"
#include "base/values.h"
+#include "ios/testing/earl_grey/wait_util.h"
namespace {
-// Constant for UI wait loop in seconds.
-const NSTimeInterval kSpinDelaySeconds = 0.01;
-
-// Constant for timeout in seconds while waiting for web element.
-const NSTimeInterval kWaitForWebElementTimeout = 4.0;
-
// Script that returns document.body as a string.
char kGetDocumentBodyJavaScript[] =
"document.body ? document.body.textContent : null";
@@ -48,7 +43,7 @@ id<GREYMatcher> webViewContainingText(NSString* text, web::WebState* webState) {
__block BOOL didSucceed = NO;
NSDate* deadline =
- [NSDate dateWithTimeIntervalSinceNow:kWaitForWebElementTimeout];
+ [NSDate dateWithTimeIntervalSinceNow:testing::kWaitForUIElementTimeout];
while (([[NSDate date] compare:deadline] != NSOrderedDescending) &&
!didSucceed) {
webState->ExecuteJavaScript(
@@ -62,7 +57,7 @@ id<GREYMatcher> webViewContainingText(NSString* text, web::WebState* webState) {
}
}));
base::test::ios::SpinRunLoopWithMaxDelay(
- base::TimeDelta::FromSecondsD(kSpinDelaySeconds));
+ base::TimeDelta::FromSecondsD(testing::kSpinDelaySeconds));
}
return didSucceed;
};
« no previous file with comments | « ios/web/ios_web_shell_tests.gyp ('k') | ios/web/shell/test/earl_grey/shell_matchers.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698