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

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

Issue 2543213003: Increase timeout of JS Injection verification. (Closed)
Patch Set: Created 4 years 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 | « no previous file | no next file » | 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_actions.mm
diff --git a/ios/web/public/test/earl_grey/web_view_actions.mm b/ios/web/public/test/earl_grey/web_view_actions.mm
index a3ee7b5d0bc84fc642e4a20f0f3b25e7c2317baf..0335592c42073bf93f93857fcbef2aeb5c331e29 100644
--- a/ios/web/public/test/earl_grey/web_view_actions.mm
+++ b/ios/web/public/test/earl_grey/web_view_actions.mm
@@ -22,6 +22,11 @@ namespace {
// Long press duration to trigger context menu.
const NSTimeInterval kContextMenuLongPressDuration = 0.3;
+// Duration to wait for verification of JavaScript action.
+// TODO(crbug.com/670910): Reduce duration if the time required for verification
+// is reduced on devices.
+const NSTimeInterval kWaitForVerificationTimeout = 8.0;
+
// Callback prefix for injected verifiers.
const std::string CallbackPrefixForElementId(const std::string& element_id) {
return "__web_test_" + element_id + "_interaction";
@@ -175,7 +180,7 @@ id<GREYAction> webViewVerifiedActionOnElement(WebState* state,
@"verified before timing out.",
action.name, element_id.c_str()];
GREYAssert(testing::WaitUntilConditionOrTimeout(
- testing::kWaitForJSCompletionTimeout,
+ kWaitForVerificationTimeout,
^{
return verified;
}),
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698