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

Unified Diff: ios/chrome/browser/ui/dialogs/javascript_dialog_egtest.mm

Issue 2642193012: Make EarlGrey matchers compliant with Chromium style. (Closed)
Patch Set: build.gn and rebase 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
« no previous file with comments | « ios/chrome/browser/ui/browser_view_controller_egtest.mm ('k') | ios/chrome/browser/ui/error_page_egtest.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/chrome/browser/ui/dialogs/javascript_dialog_egtest.mm
diff --git a/ios/chrome/browser/ui/dialogs/javascript_dialog_egtest.mm b/ios/chrome/browser/ui/dialogs/javascript_dialog_egtest.mm
index 0be5b1267ef61b117d479c597c26c930f2c0f33c..17a8f0d00f5b10c197ae5e287127ab0335c68c4b 100644
--- a/ios/chrome/browser/ui/dialogs/javascript_dialog_egtest.mm
+++ b/ios/chrome/browser/ui/dialogs/javascript_dialog_egtest.mm
@@ -147,7 +147,7 @@ const char* kJavaScriptTestResponse =
// Waits until |string| is displayed on the web view.
void WaitForWebDisplay(const std::string& string) {
id<GREYMatcher> response1Matcher =
- chrome_test_util::webViewContainingText(string);
+ chrome_test_util::WebViewContainingText(string);
[[EarlGrey selectElementWithMatcher:response1Matcher]
assertWithMatcher:grey_notNil()];
}
@@ -168,7 +168,7 @@ void WaitForAlertToBeShown(NSString* alert_label) {
ConditionBlock condition = ^{
NSError* error = nil;
id<GREYMatcher> titleLabel =
- chrome_test_util::staticTextWithAccessibilityLabel(alert_label);
+ chrome_test_util::StaticTextWithAccessibilityLabel(alert_label);
[[EarlGrey selectElementWithMatcher:titleLabel]
assertWithMatcher:grey_notNil()
error:&error];
@@ -195,7 +195,7 @@ void ShowJavaScriptDialog(JavaScriptAlertType type) {
// Check the message of the alert.
id<GREYMatcher> messageLabel =
- chrome_test_util::staticTextWithAccessibilityLabel(
+ chrome_test_util::StaticTextWithAccessibilityLabel(
GetMessageForAlertWithType(type));
[[EarlGrey selectElementWithMatcher:messageLabel]
assertWithMatcher:grey_notNil()];
@@ -209,7 +209,7 @@ void AssertJavaScriptAlertNotPresent() {
localizedTitleForJavaScriptAlertFromPage:web::test::HttpServer::MakeUrl(
kJavaScriptTestURL)];
id<GREYMatcher> titleLabel =
- chrome_test_util::staticTextWithAccessibilityLabel(alertLabel);
+ chrome_test_util::StaticTextWithAccessibilityLabel(alertLabel);
[[EarlGrey selectElementWithMatcher:titleLabel] assertWithMatcher:grey_nil()
error:&error];
return !error;
@@ -234,18 +234,18 @@ void TypeInPrompt(NSString* input) {
void TapOK() {
id<GREYMatcher> ok_button =
- chrome_test_util::buttonWithAccessibilityLabelId(IDS_OK);
+ chrome_test_util::ButtonWithAccessibilityLabelId(IDS_OK);
[[EarlGrey selectElementWithMatcher:ok_button] performAction:grey_tap()];
}
void TapCancel() {
- [[EarlGrey selectElementWithMatcher:chrome_test_util::cancelButton()]
+ [[EarlGrey selectElementWithMatcher:chrome_test_util::CancelButton()]
performAction:grey_tap()];
}
void TapSuppressDialogsButton() {
id<GREYMatcher> suppress_dialogs_button =
- chrome_test_util::buttonWithAccessibilityLabelId(
+ chrome_test_util::ButtonWithAccessibilityLabelId(
IDS_IOS_JAVA_SCRIPT_DIALOG_BLOCKING_BUTTON_TEXT);
[[EarlGrey selectElementWithMatcher:suppress_dialogs_button]
performAction:grey_tap()];
@@ -271,7 +271,7 @@ void TapSuppressDialogsButton() {
[ChromeEarlGrey loadURL:_URL];
id<GREYMatcher> response2Matcher =
- chrome_test_util::webViewContainingText(std::string(""));
+ chrome_test_util::WebViewContainingText(std::string());
[[EarlGrey selectElementWithMatcher:response2Matcher]
assertWithMatcher:grey_notNil()];
}
@@ -281,12 +281,12 @@ void TapSuppressDialogsButton() {
NSError* errorCancel = nil;
// Dismiss JavaScript alert by tapping Cancel.
- [[EarlGrey selectElementWithMatcher:chrome_test_util::cancelButton()]
+ [[EarlGrey selectElementWithMatcher:chrome_test_util::CancelButton()]
performAction:grey_tap()
error:&errorCancel];
// Dismiss JavaScript alert by tapping OK.
id<GREYMatcher> OKButton =
- chrome_test_util::buttonWithAccessibilityLabelId(IDS_OK);
+ chrome_test_util::ButtonWithAccessibilityLabelId(IDS_OK);
[[EarlGrey selectElementWithMatcher:OKButton] performAction:grey_tap()
error:&errorOK];
@@ -447,7 +447,7 @@ void TapSuppressDialogsButton() {
selectElementWithMatcher:grey_accessibilityID(kToolsMenuSettingsId)]
performAction:grey_tap()];
[[EarlGrey selectElementWithMatcher:chrome_test_util::
- staticTextWithAccessibilityLabelId(
+ StaticTextWithAccessibilityLabelId(
IDS_IOS_SETTINGS_TITLE)]
assertWithMatcher:grey_sufficientlyVisible()];
@@ -459,7 +459,7 @@ void TapSuppressDialogsButton() {
// Close the settings.
[[EarlGrey
- selectElementWithMatcher:chrome_test_util::buttonWithAccessibilityLabelId(
+ selectElementWithMatcher:chrome_test_util::ButtonWithAccessibilityLabelId(
IDS_IOS_NAVIGATION_BAR_DONE_BUTTON)]
performAction:grey_tap()];
« no previous file with comments | « ios/chrome/browser/ui/browser_view_controller_egtest.mm ('k') | ios/chrome/browser/ui/error_page_egtest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698