Chromium Code Reviews| Index: ios/chrome/browser/metrics/tab_usage_recorder_egtest.mm |
| diff --git a/ios/chrome/browser/metrics/tab_usage_recorder_egtest.mm b/ios/chrome/browser/metrics/tab_usage_recorder_egtest.mm |
| index 62129219c14f32f97bd95213654c59385b05ba2f..b19010a7a343ee7bc42de9d9f54406a09251364e 100644 |
| --- a/ios/chrome/browser/metrics/tab_usage_recorder_egtest.mm |
| +++ b/ios/chrome/browser/metrics/tab_usage_recorder_egtest.mm |
| @@ -86,7 +86,7 @@ void NewMainTabWithURL(const GURL& url, const std::string& word) { |
| chrome_test_util::OpenNewTab(); |
| [ChromeEarlGrey loadURL:url]; |
| [[EarlGrey |
| - selectElementWithMatcher:chrome_test_util::webViewContainingText(word)] |
| + selectElementWithMatcher:chrome_test_util::WebViewContainingText(word)] |
| assertWithMatcher:grey_notNil()]; |
| chrome_test_util::AssertMainTabCount(number_of_tabs + 1); |
| } |
| @@ -147,7 +147,7 @@ void CloseTabAtIndexAndSync(NSUInteger i) { |
| // Closes the tabs switcher. |
| void CloseTabSwitcher() { |
| - id<GREYMatcher> matcher = chrome_test_util::buttonWithAccessibilityLabelId( |
| + id<GREYMatcher> matcher = chrome_test_util::ButtonWithAccessibilityLabelId( |
| IDS_IOS_TAB_STRIP_LEAVE_TAB_SWITCHER); |
| [[EarlGrey selectElementWithMatcher:matcher] performAction:grey_tap()]; |
| } |
| @@ -177,20 +177,20 @@ void SwitchToNormalMode() { |
| CloseTabSwitcher(); |
| } else { |
| [[EarlGrey selectElementWithMatcher: |
| - chrome_test_util::buttonWithAccessibilityLabelId( |
| + chrome_test_util::ButtonWithAccessibilityLabelId( |
| IDS_IOS_SWITCH_BROWSER_MODE_LEAVE_INCOGNITO)] |
| performAction:grey_tap()]; |
| } |
| } else { |
| [[EarlGrey selectElementWithMatcher: |
| - chrome_test_util::buttonWithAccessibilityLabelId( |
| + chrome_test_util::ButtonWithAccessibilityLabelId( |
| IDS_IOS_TOOLBAR_SHOW_TABS)] performAction:grey_tap()]; |
| [[EarlGrey selectElementWithMatcher: |
| - chrome_test_util::buttonWithAccessibilityLabelId( |
| + chrome_test_util::ButtonWithAccessibilityLabelId( |
| IDS_IOS_TOOLS_MENU_NEW_INCOGNITO_TAB)] |
| performAction:grey_swipeSlowInDirection(kGREYDirectionRight)]; |
| [[EarlGrey selectElementWithMatcher: |
| - chrome_test_util::buttonWithAccessibilityLabelId( |
| + chrome_test_util::ButtonWithAccessibilityLabelId( |
| IDS_IOS_TOOLBAR_SHOW_TABS)] performAction:grey_tap()]; |
| } |
| ConditionBlock condition = ^bool { |
| @@ -206,12 +206,12 @@ void CheckErrorPageIsVisible() { |
| // The DNS error page is static HTML content, so it isn't part of the webview |
| // owned by the webstate. |
| [[EarlGrey selectElementWithMatcher:chrome_test_util:: |
| - webViewBelongingToWebController()] |
| + WebViewBelongingToWebController()] |
|
Eugene But (OOO till 7-30)
2017/01/23 19:39:03
Please use WebViewInWebState instead. WebViewBelon
baxley
2017/01/24 22:18:48
Done.
|
| assertWithMatcher:grey_nil()]; |
| NSString* const kError = |
| l10n_util::GetNSString(IDS_ERRORPAGES_HEADING_NOT_AVAILABLE); |
| [[EarlGrey |
| - selectElementWithMatcher:chrome_test_util::staticHtmlViewContainingText( |
| + selectElementWithMatcher:chrome_test_util::StaticHtmlViewContainingText( |
| kError)] assertWithMatcher:grey_notNil()]; |
| } |
| @@ -242,7 +242,7 @@ void OpenSettingsMenuUnsynced() { |
| // iPhone). |
| void SelectTabUsingUI(NSString* title) { |
| if (IsCompact()) { |
| - WaitAndTap(chrome_test_util::buttonWithAccessibilityLabelId( |
| + WaitAndTap(chrome_test_util::ButtonWithAccessibilityLabelId( |
| IDS_IOS_TOOLBAR_SHOW_TABS), |
| @"Tab switcher"); |
| } |
| @@ -292,7 +292,7 @@ void SelectTabUsingUI(NSString* title) { |
| // Switch back to the normal tabs. Should be on tab one. |
| SwitchToNormalMode(); |
| - [[EarlGrey selectElementWithMatcher:chrome_test_util::webViewContainingText( |
| + [[EarlGrey selectElementWithMatcher:chrome_test_util::WebViewContainingText( |
| kURL1FirstWord)] |
| assertWithMatcher:grey_notNil()]; |
| @@ -319,7 +319,7 @@ void SelectTabUsingUI(NSString* title) { |
| for (NSUInteger i = 0; i < numberOfTabs; i++) { |
| chrome_test_util::OpenNewTab(); |
| [ChromeEarlGrey loadURL:url1]; |
| - [[EarlGrey selectElementWithMatcher:chrome_test_util::webViewContainingText( |
| + [[EarlGrey selectElementWithMatcher:chrome_test_util::WebViewContainingText( |
| kURL1FirstWord)] |
| assertWithMatcher:grey_notNil()]; |
| } |
| @@ -349,7 +349,7 @@ void SelectTabUsingUI(NSString* title) { |
| }), |
| @"JavaScript to reload each tab did not finish"); |
| [ChromeEarlGreyUI reload]; |
| - [[EarlGrey selectElementWithMatcher:chrome_test_util::webViewContainingText( |
| + [[EarlGrey selectElementWithMatcher:chrome_test_util::WebViewContainingText( |
| kURL1FirstWord)] |
| assertWithMatcher:grey_notNil()]; |
| } |
| @@ -363,7 +363,7 @@ void SelectTabUsingUI(NSString* title) { |
| // Switch back to the normal tabs. Should be on tab one. |
| SwitchToNormalMode(); |
| chrome_test_util::SelectTabAtIndexInCurrentMode(0); |
| - [[EarlGrey selectElementWithMatcher:chrome_test_util::webViewContainingText( |
| + [[EarlGrey selectElementWithMatcher:chrome_test_util::WebViewContainingText( |
| kURL1FirstWord)] |
| assertWithMatcher:grey_notNil()]; |
| @@ -403,13 +403,13 @@ void SelectTabUsingUI(NSString* title) { |
| // Switch back to the normal tabs. |
| SwitchToNormalMode(); |
| - [[EarlGrey selectElementWithMatcher:chrome_test_util::webViewContainingText( |
| + [[EarlGrey selectElementWithMatcher:chrome_test_util::WebViewContainingText( |
| kURL2FirstWord)] |
| assertWithMatcher:grey_notNil()]; |
| // Select the other one so it also reloads. |
| chrome_test_util::SelectTabAtIndexInCurrentMode(0); |
| - [[EarlGrey selectElementWithMatcher:chrome_test_util::webViewContainingText( |
| + [[EarlGrey selectElementWithMatcher:chrome_test_util::WebViewContainingText( |
| kURL1FirstWord)] |
| assertWithMatcher:grey_notNil()]; |
| @@ -428,7 +428,7 @@ void SelectTabUsingUI(NSString* title) { |
| chrome_test_util::SelectTabAtIndexInCurrentMode(1); |
| chrome_test_util::SelectTabAtIndexInCurrentMode(0); |
| - [[EarlGrey selectElementWithMatcher:chrome_test_util::webViewContainingText( |
| + [[EarlGrey selectElementWithMatcher:chrome_test_util::WebViewContainingText( |
| kURL1FirstWord)] |
| assertWithMatcher:grey_notNil()]; |
| histogramTester.ExpectBucketCount(kSelectedTabHistogramName, |
| @@ -464,23 +464,23 @@ void SelectTabUsingUI(NSString* title) { |
| // Switch back to the normal tabs. |
| SwitchToNormalMode(); |
| - [[EarlGrey selectElementWithMatcher:chrome_test_util::webViewContainingText( |
| + [[EarlGrey selectElementWithMatcher:chrome_test_util::WebViewContainingText( |
| kURL2FirstWord)] |
| assertWithMatcher:grey_notNil()]; |
| const GURL url1 = web::test::HttpServer::MakeUrl(kTestUrl1); |
| const GURL url2 = web::test::HttpServer::MakeUrl(kTestUrl2); |
| [[EarlGrey |
| - selectElementWithMatcher:chrome_test_util::omniboxText(url2.GetContent())] |
| + selectElementWithMatcher:chrome_test_util::OmniboxText(url2.GetContent())] |
| assertWithMatcher:grey_notNil()]; |
| histogramTester.ExpectTotalCount(kEvictedTabReloadTime, 1, failureBlock); |
| chrome_test_util::SelectTabAtIndexInCurrentMode(0); |
| - [[EarlGrey selectElementWithMatcher:chrome_test_util::webViewContainingText( |
| + [[EarlGrey selectElementWithMatcher:chrome_test_util::WebViewContainingText( |
| kURL1FirstWord)] |
| assertWithMatcher:grey_notNil()]; |
| [[EarlGrey |
| - selectElementWithMatcher:chrome_test_util::omniboxText(url1.GetContent())] |
| + selectElementWithMatcher:chrome_test_util::OmniboxText(url1.GetContent())] |
| assertWithMatcher:grey_notNil()]; |
| histogramTester.ExpectTotalCount(kEvictedTabReloadTime, 2, failureBlock); |
| } |
| @@ -498,7 +498,7 @@ void SelectTabUsingUI(NSString* title) { |
| NewMainTabWithURL(URL, kURL1FirstWord); |
| OpenNewIncognitoTabUsingUIAndEvictMainTabs(); |
| SwitchToNormalMode(); |
| - [[EarlGrey selectElementWithMatcher:chrome_test_util::webViewContainingText( |
| + [[EarlGrey selectElementWithMatcher:chrome_test_util::WebViewContainingText( |
| kURL1FirstWord)] |
| assertWithMatcher:grey_notNil()]; |
| @@ -653,7 +653,7 @@ void SelectTabUsingUI(NSString* title) { |
| l10n_util::GetNSString(IDS_IOS_NAVIGATION_BAR_DONE_BUTTON)), |
| @"Close settings"); |
| [[GREYUIThreadExecutor sharedInstance] drainUntilIdle]; |
| - [[EarlGrey selectElementWithMatcher:chrome_test_util::webViewContainingText( |
| + [[EarlGrey selectElementWithMatcher:chrome_test_util::WebViewContainingText( |
| responses[slowURL])] |
| assertWithMatcher:grey_notNil()]; |
| @@ -757,7 +757,7 @@ void SelectTabUsingUI(NSString* title) { |
| NewMainTabWithURL(redirectURL, "arrived"); |
| - [[EarlGrey selectElementWithMatcher:chrome_test_util::omniboxText( |
| + [[EarlGrey selectElementWithMatcher:chrome_test_util::OmniboxText( |
| destinationURL.GetContent())] |
| assertWithMatcher:grey_notNil()]; |
| @@ -766,7 +766,7 @@ void SelectTabUsingUI(NSString* title) { |
| OpenNewIncognitoTabUsingUIAndEvictMainTabs(); |
| SwitchToNormalMode(); |
| chrome_test_util::SelectTabAtIndexInCurrentMode(tabIndex); |
| - [[EarlGrey selectElementWithMatcher:chrome_test_util::webViewContainingText( |
| + [[EarlGrey selectElementWithMatcher:chrome_test_util::WebViewContainingText( |
| "arrived")] |
| assertWithMatcher:grey_notNil()]; |
| @@ -811,7 +811,7 @@ void SelectTabUsingUI(NSString* title) { |
| chrome_test_util::TapWebViewElementWithId("link"); |
| [[EarlGrey |
| - selectElementWithMatcher:chrome_test_util::webViewContainingText("Whee")] |
| + selectElementWithMatcher:chrome_test_util::WebViewContainingText("Whee")] |
| assertWithMatcher:grey_notNil()]; |
| NSUInteger tabIndex = chrome_test_util::GetMainTabCount() - 1; |
| @@ -820,7 +820,7 @@ void SelectTabUsingUI(NSString* title) { |
| SwitchToNormalMode(); |
| chrome_test_util::SelectTabAtIndexInCurrentMode(tabIndex); |
| [[EarlGrey |
| - selectElementWithMatcher:chrome_test_util::webViewContainingText("Whee")] |
| + selectElementWithMatcher:chrome_test_util::WebViewContainingText("Whee")] |
| assertWithMatcher:grey_notNil()]; |
| // Verify that the page-load count has been recorded. It should contain a |
| @@ -868,7 +868,7 @@ void SelectTabUsingUI(NSString* title) { |
| int numberOfTabs = chrome_test_util::GetMainTabCount(); |
| [[EarlGrey |
| - selectElementWithMatcher:chrome_test_util::webViewContainingText("link")] |
| + selectElementWithMatcher:chrome_test_util::WebViewContainingText("link")] |
| performAction:grey_longPress()]; |
| [[EarlGrey |
| @@ -881,7 +881,7 @@ void SelectTabUsingUI(NSString* title) { |
| [[GREYUIThreadExecutor sharedInstance] drainUntilIdle]; |
| [[EarlGrey |
| - selectElementWithMatcher:chrome_test_util::webViewContainingText("Whee")] |
| + selectElementWithMatcher:chrome_test_util::WebViewContainingText("Whee")] |
| assertWithMatcher:grey_notNil()]; |
| FailureBlock failureBlock = ^(NSString* error) { |