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

Unified Diff: ios/web/shell/test/plugin_placeholder_egtest.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/navigation_egtest.mm ('k') | ios/web/shell/test/redirect_egtest.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/web/shell/test/plugin_placeholder_egtest.mm
diff --git a/ios/web/shell/test/plugin_placeholder_egtest.mm b/ios/web/shell/test/plugin_placeholder_egtest.mm
index 843a9d45911d0a28b0965a511d2bbe659ae23998..7e39fa5754072e6b38711df88922dbc9d52b20bd 100644
--- a/ios/web/shell/test/plugin_placeholder_egtest.mm
+++ b/ios/web/shell/test/plugin_placeholder_egtest.mm
@@ -20,7 +20,6 @@
#error "This file requires ARC support."
#endif
-using web::WebViewContainingText;
using web::WebViewCssSelector;
namespace {
@@ -57,10 +56,8 @@ void LoadPage(const std::string& page_content) {
LoadPage(page);
// Verify that placeholder image is not displayed.
- [[EarlGrey selectElementWithMatcher:WebViewContainingText(kPageDescription)]
- assertWithMatcher:grey_notNil()];
- [[EarlGrey selectElementWithMatcher:WebViewContainingText(kFallbackText)]
- assertWithMatcher:grey_notNil()];
+ [ShellEarlGrey waitForWebViewContainingText:kPageDescription];
+ [ShellEarlGrey waitForWebViewContainingText:kFallbackText];
[[EarlGrey selectElementWithMatcher:WebViewCssSelector("img")]
assertWithMatcher:grey_nil()];
}
@@ -78,8 +75,7 @@ void LoadPage(const std::string& page_content) {
LoadPage(page);
// Verify that plugin object is replaced with placeholder image.
- [[EarlGrey selectElementWithMatcher:WebViewContainingText(kPageDescription)]
- assertWithMatcher:grey_notNil()];
+ [ShellEarlGrey waitForWebViewContainingText:kPageDescription];
[[EarlGrey selectElementWithMatcher:WebViewCssSelector("img[src*='data']")]
assertWithMatcher:grey_notNil()];
}
@@ -101,8 +97,7 @@ void LoadPage(const std::string& page_content) {
LoadPage(page);
// Verify that plugin object is replaced with placeholder image.
- [[EarlGrey selectElementWithMatcher:WebViewContainingText(kPageDescription)]
- assertWithMatcher:grey_notNil()];
+ [ShellEarlGrey waitForWebViewContainingText:kPageDescription];
[[EarlGrey selectElementWithMatcher:WebViewCssSelector("img[src*='data']")]
assertWithMatcher:grey_notNil()];
}
@@ -124,10 +119,8 @@ void LoadPage(const std::string& page_content) {
LoadPage(page);
// Verify that placeholder image is not displayed.
- [[EarlGrey selectElementWithMatcher:WebViewContainingText(kPageDescription)]
- assertWithMatcher:grey_notNil()];
- [[EarlGrey selectElementWithMatcher:WebViewContainingText(kFallbackText)]
- assertWithMatcher:grey_notNil()];
+ [ShellEarlGrey waitForWebViewContainingText:kPageDescription];
+ [ShellEarlGrey waitForWebViewContainingText:kFallbackText];
[[EarlGrey selectElementWithMatcher:WebViewCssSelector("img")]
assertWithMatcher:grey_nil()];
}
@@ -146,8 +139,7 @@ void LoadPage(const std::string& page_content) {
LoadPage(page);
// Verify that plugin object is replaced with placeholder image.
- [[EarlGrey selectElementWithMatcher:WebViewContainingText(kPageDescription)]
- assertWithMatcher:grey_notNil()];
+ [ShellEarlGrey waitForWebViewContainingText:kPageDescription];
[[EarlGrey selectElementWithMatcher:WebViewCssSelector("img[src*='data']")]
assertWithMatcher:grey_notNil()];
}
@@ -165,8 +157,7 @@ void LoadPage(const std::string& page_content) {
LoadPage(page);
// Verify that placeholder image is not displayed.
- [[EarlGrey selectElementWithMatcher:WebViewContainingText(kPageDescription)]
- assertWithMatcher:grey_notNil()];
+ [ShellEarlGrey waitForWebViewContainingText:kPageDescription];
[[EarlGrey selectElementWithMatcher:WebViewCssSelector("img")]
assertWithMatcher:grey_nil()];
}
@@ -203,8 +194,7 @@ void LoadPage(const std::string& page_content) {
LoadPage(page);
// Verify that placeholder image is not displayed.
- [[EarlGrey selectElementWithMatcher:WebViewContainingText(kPageDescription)]
- assertWithMatcher:grey_notNil()];
+ [ShellEarlGrey waitForWebViewContainingText:kPageDescription];
[[EarlGrey selectElementWithMatcher:WebViewCssSelector("img")]
assertWithMatcher:grey_nil()];
}
« no previous file with comments | « ios/web/shell/test/navigation_egtest.mm ('k') | ios/web/shell/test/redirect_egtest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698