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

Unified Diff: ios/chrome/browser/metrics/tab_usage_recorder_egtest.mm

Issue 2784943002: Remove matcher to wait for static HTML view. (Closed)
Patch Set: typo Created 3 years, 9 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/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 3635dd21578e06d7af9af8f1480f77f66789ebbc..87a3b6aa37706545665157ef1323f698457c04f6 100644
--- a/ios/chrome/browser/metrics/tab_usage_recorder_egtest.mm
+++ b/ios/chrome/browser/metrics/tab_usage_recorder_egtest.mm
@@ -198,16 +198,6 @@ void SwitchToNormalMode() {
@"Waiting switch to normal mode.");
}
-// Check that the error page is visible.
-void CheckErrorPageIsVisible() {
- // The DNS error page is static HTML content.
- NSString* const kError =
- l10n_util::GetNSString(IDS_ERRORPAGES_HEADING_NOT_AVAILABLE);
- [[EarlGrey
- selectElementWithMatcher:chrome_test_util::StaticHtmlViewContainingText(
- kError)] assertWithMatcher:grey_notNil()];
-}
-
// Open the settings submenu. Assumes that settings menu is visible.
void OpenSettingsSubMenuUnsynced(int submenu) {
id<GREYMatcher> settings_button_matcher =
@@ -515,11 +505,11 @@ void SelectTabUsingUI(NSString* title) {
chrome_test_util::OpenNewTab();
[ChromeEarlGrey loadURL:invalidURL];
- CheckErrorPageIsVisible();
+ [ChromeEarlGrey waitForErrorPage];
OpenNewIncognitoTabUsingUIAndEvictMainTabs();
SwitchToNormalMode();
- CheckErrorPageIsVisible();
+ [ChromeEarlGrey waitForErrorPage];
histogramTester.ExpectUniqueSample(kEvictedTabReloadSuccessRate,
TabUsageRecorder::LOAD_FAILURE, 1,

Powered by Google App Engine
This is Rietveld 408576698