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.h" |
17 #include "ios/web/public/test/http_server_util.h" | 17 #include "ios/web/public/test/http_server_util.h" |
18 #import "ios/web/public/test/response_providers/http_auth_response_provider.h" | 18 #import "ios/web/public/test/response_providers/http_auth_response_provider.h" |
19 #import "ios/testing/earl_grey/disabled_test_macros.h" | |
20 #include "ui/base/l10n/l10n_util_mac.h" | 19 #include "ui/base/l10n/l10n_util_mac.h" |
21 #include "url/gurl.h" | 20 #include "url/gurl.h" |
22 | 21 |
23 using testing::WaitUntilConditionOrTimeout; | 22 using testing::WaitUntilConditionOrTimeout; |
24 using testing::kWaitForPageLoadTimeout; | 23 using testing::kWaitForPageLoadTimeout; |
25 using chrome_test_util::WebViewContainingText; | 24 using chrome_test_util::WebViewContainingText; |
26 | 25 |
27 namespace { | 26 namespace { |
28 | 27 |
29 // Returns matcher for HTTP Authentication dialog. | 28 // Returns matcher for HTTP Authentication dialog. |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
138 chrome_test_util::LoadUrl(URL); | 137 chrome_test_util::LoadUrl(URL); |
139 WaitForHttpAuthDialog(); | 138 WaitForHttpAuthDialog(); |
140 | 139 |
141 [[EarlGrey selectElementWithMatcher:chrome_test_util::CancelButton()] | 140 [[EarlGrey selectElementWithMatcher:chrome_test_util::CancelButton()] |
142 performAction:grey_tap()]; | 141 performAction:grey_tap()]; |
143 [[EarlGrey selectElementWithMatcher:HttpAuthDialog()] | 142 [[EarlGrey selectElementWithMatcher:HttpAuthDialog()] |
144 assertWithMatcher:grey_nil()]; | 143 assertWithMatcher:grey_nil()]; |
145 } | 144 } |
146 | 145 |
147 @end | 146 @end |
OLD | NEW |