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

Side by Side Diff: ios/chrome/browser/ui/error_page_egtest.mm

Issue 2657763002: Disable EarlGrey tests that break using webview in current webstate. (Closed)
Patch Set: 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 unified diff | Download patch
« no previous file with comments | « ios/chrome/browser/ui/activity_services/activity_service_controller_egtest.mm ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #import <EarlGrey/EarlGrey.h> 5 #import <EarlGrey/EarlGrey.h>
6 6
7 #include "components/strings/grit/components_strings.h" 7 #include "components/strings/grit/components_strings.h"
8 #import "ios/chrome/test/app/chrome_test_util.h" 8 #import "ios/chrome/test/app/chrome_test_util.h"
9 #include "ios/chrome/test/app/web_view_interaction_test_util.h" 9 #include "ios/chrome/test/app/web_view_interaction_test_util.h"
10 #import "ios/chrome/test/earl_grey/chrome_earl_grey.h" 10 #import "ios/chrome/test/earl_grey/chrome_earl_grey.h"
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 assertWithMatcher:grey_notNil()]; 63 assertWithMatcher:grey_notNil()];
64 const std::string kError = 64 const std::string kError =
65 l10n_util::GetStringUTF8(IDS_ERRORPAGES_HEADING_NOT_AVAILABLE); 65 l10n_util::GetStringUTF8(IDS_ERRORPAGES_HEADING_NOT_AVAILABLE);
66 [[EarlGrey selectElementWithMatcher:WebViewContainingText(kError)] 66 [[EarlGrey selectElementWithMatcher:WebViewContainingText(kError)]
67 assertWithMatcher:grey_nil()]; 67 assertWithMatcher:grey_nil()];
68 } 68 }
69 69
70 #pragma mark - tests 70 #pragma mark - tests
71 71
72 // Tests whether the error page is displayed for a bad URL. 72 // Tests whether the error page is displayed for a bad URL.
73 - (void)testErrorPage { 73 // TODO(crbug.com/684987): Re-enable this test.
74 - (void)DISABLED_testErrorPage {
74 std::unique_ptr<web::DataResponseProvider> provider( 75 std::unique_ptr<web::DataResponseProvider> provider(
75 new ErrorPageResponseProvider()); 76 new ErrorPageResponseProvider());
76 web::test::SetUpHttpServer(std::move(provider)); 77 web::test::SetUpHttpServer(std::move(provider));
77 78
78 [ChromeEarlGrey loadURL:ErrorPageResponseProvider::GetDnsFailureUrl()]; 79 [ChromeEarlGrey loadURL:ErrorPageResponseProvider::GetDnsFailureUrl()];
79 80
80 [self checkErrorPageIsVisible]; 81 [self checkErrorPageIsVisible];
81 } 82 }
82 83
83 // Tests whether the error page is displayed if it is behind a redirect. 84 // Tests whether the error page is displayed if it is behind a redirect.
84 - (void)testErrorPageRedirect { 85 // TODO(crbug.com/684987): Re-enable this test.
86 - (void)DISABLED_testErrorPageRedirect {
85 std::unique_ptr<web::DataResponseProvider> provider( 87 std::unique_ptr<web::DataResponseProvider> provider(
86 new ErrorPageResponseProvider()); 88 new ErrorPageResponseProvider());
87 web::test::SetUpHttpServer(std::move(provider)); 89 web::test::SetUpHttpServer(std::move(provider));
88 90
89 // Load a URL that redirects to the DNS-failing URL. 91 // Load a URL that redirects to the DNS-failing URL.
90 [ChromeEarlGrey 92 [ChromeEarlGrey
91 loadURL:ErrorPageResponseProvider::GetRedirectToDnsFailureUrl()]; 93 loadURL:ErrorPageResponseProvider::GetRedirectToDnsFailureUrl()];
92 94
93 // Verify that the redirect occurred before checking for the DNS error. 95 // Verify that the redirect occurred before checking for the DNS error.
94 const std::string& redirectedURL = 96 const std::string& redirectedURL =
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 [ChromeEarlGrey loadURL:URL]; 179 [ChromeEarlGrey loadURL:URL];
178 TapWebViewElementWithId(kButtonId); 180 TapWebViewElementWithId(kButtonId);
179 // Check that the timer has completed. 181 // Check that the timer has completed.
180 [[EarlGrey selectElementWithMatcher:WebViewContainingText(kTimerCompleted)] 182 [[EarlGrey selectElementWithMatcher:WebViewContainingText(kTimerCompleted)]
181 assertWithMatcher:grey_notNil()]; 183 assertWithMatcher:grey_notNil()];
182 // DNS error page should still not appear. 184 // DNS error page should still not appear.
183 [self checkErrorPageIsNotVisible]; 185 [self checkErrorPageIsNotVisible];
184 } 186 }
185 187
186 @end 188 @end
OLDNEW
« no previous file with comments | « ios/chrome/browser/ui/activity_services/activity_service_controller_egtest.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698