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

Unified Diff: ios/chrome/browser/ui/error_page_egtest.mm

Issue 2642193012: Make EarlGrey matchers compliant with Chromium style. (Closed)
Patch Set: mistake Created 3 years, 11 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
Index: ios/chrome/browser/ui/error_page_egtest.mm
diff --git a/ios/chrome/browser/ui/error_page_egtest.mm b/ios/chrome/browser/ui/error_page_egtest.mm
index a6f6e6cbc0bb2f2a6fdf62c58ae0c7f4aa34973c..a17bece13591cbea5c71ec88262dac71fe44fe2c 100644
--- a/ios/chrome/browser/ui/error_page_egtest.mm
+++ b/ios/chrome/browser/ui/error_page_egtest.mm
@@ -16,11 +16,11 @@
#include "ui/base/l10n/l10n_util.h"
#include "ui/base/l10n/l10n_util_mac.h"
-using chrome_test_util::omniboxText;
-using chrome_test_util::staticHtmlViewContainingText;
+using chrome_test_util::OmniboxText;
+using chrome_test_util::StaticHtmlViewContainingText;
using chrome_test_util::TapWebViewElementWithId;
-using chrome_test_util::webViewBelongingToWebController;
-using chrome_test_util::webViewContainingText;
+using chrome_test_util::WebViewBelongingToWebController;
Eugene But (OOO till 7-30) 2017/01/23 19:39:03 Please use WebViewInWebState instead.
baxley 2017/01/24 22:18:49 Done.
+using chrome_test_util::WebViewContainingText;
using web::test::HttpServer;
@@ -43,22 +43,22 @@ using web::test::HttpServer;
- (void)checkErrorPageIsVisible {
// The DNS error page is static HTML content, so it isn't part of the webview
// owned by the webstate.
- [[EarlGrey selectElementWithMatcher:webViewBelongingToWebController()]
+ [[EarlGrey selectElementWithMatcher:WebViewBelongingToWebController()]
assertWithMatcher:grey_nil()];
NSString* const kError =
l10n_util::GetNSString(IDS_ERRORPAGES_HEADING_NOT_AVAILABLE);
- [[EarlGrey selectElementWithMatcher:staticHtmlViewContainingText(kError)]
+ [[EarlGrey selectElementWithMatcher:StaticHtmlViewContainingText(kError)]
assertWithMatcher:grey_notNil()];
}
- (void)checkErrorPageIsNotVisible {
// Check that the webview belongs to the web controller, and that the error
// text doesn't appear in the webview.
- [[EarlGrey selectElementWithMatcher:webViewBelongingToWebController()]
+ [[EarlGrey selectElementWithMatcher:WebViewBelongingToWebController()]
assertWithMatcher:grey_notNil()];
const std::string kError =
l10n_util::GetStringUTF8(IDS_ERRORPAGES_HEADING_NOT_AVAILABLE);
- [[EarlGrey selectElementWithMatcher:webViewContainingText(kError)]
+ [[EarlGrey selectElementWithMatcher:WebViewContainingText(kError)]
assertWithMatcher:grey_nil()];
}
@@ -88,7 +88,7 @@ using web::test::HttpServer;
// Verify that the redirect occurred before checking for the DNS error.
const std::string& redirectedURL =
ErrorPageResponseProvider::GetDnsFailureUrl().GetContent();
- [[EarlGrey selectElementWithMatcher:omniboxText(redirectedURL)]
+ [[EarlGrey selectElementWithMatcher:OmniboxText(redirectedURL)]
assertWithMatcher:grey_notNil()];
[self checkErrorPageIsVisible];
@@ -135,7 +135,7 @@ using web::test::HttpServer;
[ChromeEarlGrey loadURL:URL];
// Check that the timer has completed.
- [[EarlGrey selectElementWithMatcher:webViewContainingText(kTimerCompleted)]
+ [[EarlGrey selectElementWithMatcher:WebViewContainingText(kTimerCompleted)]
assertWithMatcher:grey_notNil()];
// DNS error page should still not appear.
[self checkErrorPageIsNotVisible];
@@ -172,7 +172,7 @@ using web::test::HttpServer;
[ChromeEarlGrey loadURL:URL];
TapWebViewElementWithId(kButtonId);
// Check that the timer has completed.
- [[EarlGrey selectElementWithMatcher:webViewContainingText(kTimerCompleted)]
+ [[EarlGrey selectElementWithMatcher:WebViewContainingText(kTimerCompleted)]
assertWithMatcher:grey_notNil()];
// DNS error page should still not appear.
[self checkErrorPageIsNotVisible];

Powered by Google App Engine
This is Rietveld 408576698