| 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 "base/memory/ptr_util.h" | 7 #include "base/memory/ptr_util.h" |
| 8 #include "base/strings/sys_string_conversions.h" | 8 #include "base/strings/sys_string_conversions.h" |
| 9 #include "components/strings/grit/components_strings.h" | 9 #include "components/strings/grit/components_strings.h" |
| 10 #include "ios/chrome/browser/ui/ui_util.h" | 10 #include "ios/chrome/browser/ui/ui_util.h" |
| 11 #include "ios/chrome/grit/ios_strings.h" | 11 #include "ios/chrome/grit/ios_strings.h" |
| 12 #include "ios/chrome/test/app/navigation_test_util.h" | 12 #include "ios/chrome/test/app/navigation_test_util.h" |
| 13 #import "ios/chrome/test/earl_grey/chrome_matchers.h" | 13 #import "ios/chrome/test/earl_grey/chrome_matchers.h" |
| 14 #import "ios/chrome/test/earl_grey/chrome_test_case.h" | 14 #import "ios/chrome/test/earl_grey/chrome_test_case.h" |
| 15 #import "ios/testing/wait_util.h" | 15 #import "ios/testing/wait_util.h" |
| 16 #import "ios/web/public/test/http_server.h" | 16 #import "ios/web/public/test/http_server/http_auth_response_provider.h" |
| 17 #include "ios/web/public/test/http_server_util.h" | 17 #import "ios/web/public/test/http_server/http_server.h" |
| 18 #import "ios/web/public/test/response_providers/http_auth_response_provider.h" | 18 #include "ios/web/public/test/http_server/http_server_util.h" |
| 19 #include "ui/base/l10n/l10n_util_mac.h" | 19 #include "ui/base/l10n/l10n_util_mac.h" |
| 20 #include "url/gurl.h" | 20 #include "url/gurl.h" |
| 21 | 21 |
| 22 #if !defined(__has_feature) || !__has_feature(objc_arc) | 22 #if !defined(__has_feature) || !__has_feature(objc_arc) |
| 23 #error "This file requires ARC support." | 23 #error "This file requires ARC support." |
| 24 #endif | 24 #endif |
| 25 | 25 |
| 26 using testing::WaitUntilConditionOrTimeout; | 26 using testing::WaitUntilConditionOrTimeout; |
| 27 using testing::kWaitForPageLoadTimeout; | 27 using testing::kWaitForPageLoadTimeout; |
| 28 using chrome_test_util::WebViewContainingText; | 28 using chrome_test_util::WebViewContainingText; |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 141 chrome_test_util::LoadUrl(URL); | 141 chrome_test_util::LoadUrl(URL); |
| 142 WaitForHttpAuthDialog(); | 142 WaitForHttpAuthDialog(); |
| 143 | 143 |
| 144 [[EarlGrey selectElementWithMatcher:chrome_test_util::CancelButton()] | 144 [[EarlGrey selectElementWithMatcher:chrome_test_util::CancelButton()] |
| 145 performAction:grey_tap()]; | 145 performAction:grey_tap()]; |
| 146 [[EarlGrey selectElementWithMatcher:HttpAuthDialog()] | 146 [[EarlGrey selectElementWithMatcher:HttpAuthDialog()] |
| 147 assertWithMatcher:grey_nil()]; | 147 assertWithMatcher:grey_nil()]; |
| 148 } | 148 } |
| 149 | 149 |
| 150 @end | 150 @end |
| OLD | NEW |