Chromium Code Reviews| Index: ios/chrome/browser/ui/ntp/recent_tabs/recent_tabs_panel_controller_egtest.mm |
| diff --git a/ios/chrome/browser/ui/ntp/recent_tabs/recent_tabs_panel_controller_egtest.mm b/ios/chrome/browser/ui/ntp/recent_tabs/recent_tabs_panel_controller_egtest.mm |
| index 3b0db053980be8741451265b7f2bb1f135f47ad0..a4691e8df052ee0f266ce5018ab89d0055fd465f 100644 |
| --- a/ios/chrome/browser/ui/ntp/recent_tabs/recent_tabs_panel_controller_egtest.mm |
| +++ b/ios/chrome/browser/ui/ntp/recent_tabs/recent_tabs_panel_controller_egtest.mm |
| @@ -49,20 +49,20 @@ void CloseRecentTabsPanelOnIphone() { |
| } |
| // Returns the matcher for the entry of the page in the recent tabs panel. |
| -id<GREYMatcher> titleOfTestPageMatcher() { |
| +id<GREYMatcher> TitleOfTestPageMatcher() { |
|
Eugene But (OOO till 7-30)
2017/01/23 19:39:03
Do you want to drop matcher suffix for consistency
baxley
2017/01/24 22:18:49
Done.
|
| return grey_allOf( |
| - chrome_test_util::staticTextWithAccessibilityLabel(kTitleOfTestPage), |
| + chrome_test_util::StaticTextWithAccessibilityLabel(kTitleOfTestPage), |
| grey_sufficientlyVisible(), nil); |
| } |
| // Returns the matcher for the back button. |
| -id<GREYMatcher> backButtonMatcher() { |
| - return chrome_test_util::buttonWithAccessibilityLabelId(IDS_ACCNAME_BACK); |
| +id<GREYMatcher> BackButtonMatcher() { |
|
Eugene But (OOO till 7-30)
2017/01/23 19:39:03
Could you please use existing matcher from chrome_
baxley
2017/01/24 22:18:49
Done.
|
| + return chrome_test_util::ButtonWithAccessibilityLabelId(IDS_ACCNAME_BACK); |
| } |
| // Returns the matcher for the Recently closed label. |
| -id<GREYMatcher> recentlyClosedLabelMatcher() { |
| - return chrome_test_util::staticTextWithAccessibilityLabelId( |
| +id<GREYMatcher> RecentlyClosedLabelMatcher() { |
| + return chrome_test_util::StaticTextWithAccessibilityLabelId( |
| IDS_IOS_RECENT_TABS_RECENTLY_CLOSED); |
| } |
| @@ -87,14 +87,14 @@ id<GREYMatcher> recentlyClosedLabelMatcher() { |
| if (IsIPadIdiom()) { |
| chrome_test_util::OpenNewTab(); |
| NSError* error = nil; |
| - [[EarlGrey selectElementWithMatcher:recentlyClosedLabelMatcher()] |
| + [[EarlGrey selectElementWithMatcher:RecentlyClosedLabelMatcher()] |
| assertWithMatcher:grey_notNil() |
| error:&error]; |
| // If the Recent Tabs panel is shown, then switch back to the Most Visited |
| // panel so that tabs opened in other tests will show the Most Visited panel |
| // instead of the Recent Tabs panel. |
| if (!error) { |
| - [[EarlGrey selectElementWithMatcher:recentlyClosedLabelMatcher()] |
| + [[EarlGrey selectElementWithMatcher:RecentlyClosedLabelMatcher()] |
| performAction:grey_swipeFastInDirection(kGREYDirectionRight)]; |
| } |
| chrome_test_util::CloseCurrentTab(); |
| @@ -109,21 +109,21 @@ id<GREYMatcher> recentlyClosedLabelMatcher() { |
| // Open the test page in a new tab. |
| [ChromeEarlGrey loadURL:testPageURL]; |
| id<GREYMatcher> webViewMatcher = |
| - chrome_test_util::webViewContainingText("hello"); |
| + chrome_test_util::WebViewContainingText("hello"); |
| [[EarlGrey selectElementWithMatcher:webViewMatcher] |
| assertWithMatcher:grey_notNil()]; |
| // Open the Recent Tabs panel, check that the test page is not |
| // present. |
| OpenRecentTabsPanel(); |
| - [[EarlGrey selectElementWithMatcher:titleOfTestPageMatcher()] |
| + [[EarlGrey selectElementWithMatcher:TitleOfTestPageMatcher()] |
| assertWithMatcher:grey_nil()]; |
| // Get rid of the Recent Tabs Panel. |
| if (IsIPadIdiom()) { |
| // On iPad, the Recent Tabs panel is a new page in the navigation history. |
| // Go back to the previous page to restore the test page. |
| - [[EarlGrey selectElementWithMatcher:backButtonMatcher()] |
| + [[EarlGrey selectElementWithMatcher:BackButtonMatcher()] |
| performAction:grey_tap()]; |
| [ChromeEarlGrey waitForPageToFinishLoading]; |
| } else { |
| @@ -139,15 +139,15 @@ id<GREYMatcher> recentlyClosedLabelMatcher() { |
| // Open the Recent Tabs panel and check that the test page is present. |
| OpenRecentTabsPanel(); |
| - [[EarlGrey selectElementWithMatcher:titleOfTestPageMatcher()] |
| + [[EarlGrey selectElementWithMatcher:TitleOfTestPageMatcher()] |
| assertWithMatcher:grey_notNil()]; |
| // Tap on the entry for the test page in the Recent Tabs panel and check that |
| // a tab containing the test page was opened. |
| - [[EarlGrey selectElementWithMatcher:titleOfTestPageMatcher()] |
| + [[EarlGrey selectElementWithMatcher:TitleOfTestPageMatcher()] |
| performAction:grey_tap()]; |
| - [[EarlGrey selectElementWithMatcher:chrome_test_util::omnibox()] |
| - assertWithMatcher:chrome_test_util::omniboxText( |
| + [[EarlGrey selectElementWithMatcher:chrome_test_util::Omnibox()] |
| + assertWithMatcher:chrome_test_util::OmniboxText( |
| testPageURL.GetContent())]; |
| } |