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

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

Issue 2798773002: Create ChromeEarlGrey waitForWebViewContainingText. (Closed)
Patch Set: review comments Created 3 years, 6 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/shell/test/earl_grey/shell_earl_grey.h ('k') | ios/web/shell/test/earl_grey/web_shell_test_case.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/web/shell/test/earl_grey/shell_earl_grey.mm
diff --git a/ios/web/shell/test/earl_grey/shell_earl_grey.mm b/ios/web/shell/test/earl_grey/shell_earl_grey.mm
index bdf8f1b47face21f3577251265b48677eb79864c..ed21c5b2f2465049e99602973be516d28d5d23d8 100644
--- a/ios/web/shell/test/earl_grey/shell_earl_grey.mm
+++ b/ios/web/shell/test/earl_grey/shell_earl_grey.mm
@@ -8,6 +8,7 @@
#import "ios/testing/wait_util.h"
#import "ios/web/public/test/earl_grey/js_test_util.h"
+#import "ios/web/public/test/web_view_content_test_util.h"
#include "ios/web/shell/test/app/navigation_test_util.h"
#import "ios/web/shell/test/app/web_shell_test_util.h"
@@ -40,4 +41,15 @@
[[GREYUIThreadExecutor sharedInstance] drainUntilIdle];
}
++ (void)waitForWebViewContainingText:(std::string)text {
+ GREYCondition* condition = [GREYCondition
+ conditionWithName:@"Wait for web view containing text"
+ block:^BOOL {
+ return web::test::IsWebViewContainingText(
+ web::shell_test_util::GetCurrentWebState(), text);
+ }];
+ GREYAssert([condition waitWithTimeout:testing::kWaitForUIElementTimeout],
+ @"Failed waiting for web view containing %s", text.c_str());
+}
+
@end
« no previous file with comments | « ios/web/shell/test/earl_grey/shell_earl_grey.h ('k') | ios/web/shell/test/earl_grey/web_shell_test_case.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698