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

Unified Diff: ios/chrome/browser/ui/fullscreen_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
Index: ios/chrome/browser/ui/fullscreen_egtest.mm
diff --git a/ios/chrome/browser/ui/fullscreen_egtest.mm b/ios/chrome/browser/ui/fullscreen_egtest.mm
index 34390650c775f7ab5abc0fa1d87cc08fb8145cab..4686bf199aac65235009b073bb441aab3ee073ce 100644
--- a/ios/chrome/browser/ui/fullscreen_egtest.mm
+++ b/ios/chrome/browser/ui/fullscreen_egtest.mm
@@ -34,7 +34,7 @@ namespace {
// of ios/web/shell/test/page_state_egtest.mm.
// Returns a matcher for asserting that element's content offset matches the
// given |offset|.
-id<GREYMatcher> contentOffset(CGPoint offset) {
+id<GREYMatcher> ContentOffset(CGPoint offset) {
MatchesBlock matches = ^BOOL(UIScrollView* element) {
return CGPointEqualToPoint([element contentOffset], offset);
};
@@ -51,7 +51,7 @@ id<GREYMatcher> contentOffset(CGPoint offset) {
// Hides the toolbar by scrolling down.
void HideToolbarUsingUI() {
[[EarlGrey
- selectElementWithMatcher:webViewScrollView(
+ selectElementWithMatcher:WebViewScrollView(
chrome_test_util::GetCurrentWebState())]
performAction:grey_swipeFastInDirection(kGREYDirectionUp)];
}
@@ -64,7 +64,7 @@ void AssertURLIs(const GURL& expectedURL) {
ConditionBlock condition = ^{
NSError* error = nil;
- [[EarlGrey selectElementWithMatcher:chrome_test_util::omniboxText(
+ [[EarlGrey selectElementWithMatcher:chrome_test_util::OmniboxText(
expectedURL.GetContent())]
assertWithMatcher:grey_notNil()
error:&error];
@@ -76,7 +76,7 @@ void AssertURLIs(const GURL& expectedURL) {
// Asserts that the current web view containers contains |text|.
void AssertStringIsPresentOnPage(const std::string& text) {
id<GREYMatcher> response_matcher =
- chrome_test_util::webViewContainingText(text);
+ chrome_test_util::WebViewContainingText(text);
[[EarlGrey selectElementWithMatcher:response_matcher]
assertWithMatcher:grey_notNil()];
}
@@ -107,9 +107,9 @@ void AssertStringIsPresentOnPage(const std::string& text) {
// generates these values is exposed.
CGFloat yOffset = IsIPadIdiom() ? -95.0 : -56.0;
[[EarlGrey
- selectElementWithMatcher:web::webViewScrollView(
+ selectElementWithMatcher:web::WebViewScrollView(
chrome_test_util::GetCurrentWebState())]
- assertWithMatcher:contentOffset(CGPointMake(0, yOffset))];
+ assertWithMatcher:ContentOffset(CGPointMake(0, yOffset))];
}
// Verifies that the toolbar properly appears/disappears when scrolling up/down
@@ -122,7 +122,7 @@ void AssertStringIsPresentOnPage(const std::string& text) {
// Test that the toolbar is still visible after a user swipes down.
[[EarlGrey
- selectElementWithMatcher:webViewScrollView(
+ selectElementWithMatcher:WebViewScrollView(
chrome_test_util::GetCurrentWebState())]
performAction:grey_swipeFastInDirection(kGREYDirectionDown)];
chrome_test_util::AssertToolbarVisible();
@@ -146,7 +146,7 @@ void AssertStringIsPresentOnPage(const std::string& text) {
// Test that the toolbar is visible after a user swipes down.
[[EarlGrey
- selectElementWithMatcher:webViewScrollView(
+ selectElementWithMatcher:WebViewScrollView(
chrome_test_util::GetCurrentWebState())]
performAction:grey_swipeFastInDirection(kGREYDirectionDown)];
chrome_test_util::AssertToolbarVisible();
@@ -192,7 +192,7 @@ void AssertStringIsPresentOnPage(const std::string& text) {
// Scroll up to be sure the toolbar can be dismissed by scrolling down.
[[EarlGrey
- selectElementWithMatcher:webViewScrollView(
+ selectElementWithMatcher:WebViewScrollView(
chrome_test_util::GetCurrentWebState())]
performAction:grey_swipeFastInDirection(kGREYDirectionDown)];
@@ -222,7 +222,7 @@ void AssertStringIsPresentOnPage(const std::string& text) {
chrome_test_util::AssertToolbarNotVisible();
// Simulate a user scroll up.
[[EarlGrey
- selectElementWithMatcher:webViewScrollView(
+ selectElementWithMatcher:WebViewScrollView(
chrome_test_util::GetCurrentWebState())]
performAction:grey_swipeFastInDirection(kGREYDirectionDown)];
chrome_test_util::AssertToolbarVisible();
« no previous file with comments | « ios/chrome/browser/ui/first_run/first_run_egtest.mm ('k') | ios/chrome/browser/ui/history/history_ui_egtest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698