| OLD | NEW |
| 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" |
| 11 #import "ios/chrome/test/earl_grey/chrome_matchers.h" | 11 #import "ios/chrome/test/earl_grey/chrome_matchers.h" |
| 12 #import "ios/chrome/test/earl_grey/chrome_test_case.h" | 12 #import "ios/chrome/test/earl_grey/chrome_test_case.h" |
| 13 #import "ios/web/public/test/http_server.h" | 13 #import "ios/web/public/test/http_server.h" |
| 14 #import "ios/web/public/test/earl_grey/web_view_matchers.h" | 14 #import "ios/web/public/test/earl_grey/web_view_matchers.h" |
| 15 #include "ios/web/public/test/http_server_util.h" | 15 #include "ios/web/public/test/http_server_util.h" |
| 16 #include "ios/web/public/test/response_providers/data_response_provider.h" | 16 #include "ios/web/public/test/response_providers/data_response_provider.h" |
| 17 #include "ios/web/public/test/response_providers/error_page_response_provider.h" | 17 #include "ios/web/public/test/response_providers/error_page_response_provider.h" |
| 18 #include "ui/base/l10n/l10n_util.h" | 18 #include "ui/base/l10n/l10n_util.h" |
| 19 #include "ui/base/l10n/l10n_util_mac.h" | 19 #include "ui/base/l10n/l10n_util_mac.h" |
| 20 | 20 |
| 21 #if !defined(__has_feature) || !__has_feature(objc_arc) |
| 22 #error "This file requires ARC support." |
| 23 #endif |
| 24 |
| 21 using chrome_test_util::OmniboxText; | 25 using chrome_test_util::OmniboxText; |
| 22 using chrome_test_util::StaticHtmlViewContainingText; | 26 using chrome_test_util::StaticHtmlViewContainingText; |
| 23 using chrome_test_util::TapWebViewElementWithId; | 27 using chrome_test_util::TapWebViewElementWithId; |
| 24 using chrome_test_util::WebViewContainingText; | 28 using chrome_test_util::WebViewContainingText; |
| 25 | 29 |
| 26 using web::test::HttpServer; | 30 using web::test::HttpServer; |
| 27 | 31 |
| 28 // Tests display of error pages for bad URLs. | 32 // Tests display of error pages for bad URLs. |
| 29 @interface ErrorPageTestCase : ChromeTestCase | 33 @interface ErrorPageTestCase : ChromeTestCase |
| 30 | 34 |
| (...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 173 [ChromeEarlGrey loadURL:URL]; | 177 [ChromeEarlGrey loadURL:URL]; |
| 174 TapWebViewElementWithId(kButtonId); | 178 TapWebViewElementWithId(kButtonId); |
| 175 // Check that the timer has completed. | 179 // Check that the timer has completed. |
| 176 [[EarlGrey selectElementWithMatcher:WebViewContainingText(kTimerCompleted)] | 180 [[EarlGrey selectElementWithMatcher:WebViewContainingText(kTimerCompleted)] |
| 177 assertWithMatcher:grey_notNil()]; | 181 assertWithMatcher:grey_notNil()]; |
| 178 // DNS error page should still not appear. | 182 // DNS error page should still not appear. |
| 179 [self checkErrorPageIsNotVisible]; | 183 [self checkErrorPageIsNotVisible]; |
| 180 } | 184 } |
| 181 | 185 |
| 182 @end | 186 @end |
| OLD | NEW |