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/ios/ios_util.h" | 7 #include "base/ios/ios_util.h" |
8 #include "components/content_settings/core/common/content_settings.h" | 8 #include "components/content_settings/core/common/content_settings.h" |
9 #include "ios/chrome/test/app/settings_test_util.h" | 9 #include "ios/chrome/test/app/settings_test_util.h" |
10 #import "ios/chrome/test/app/tab_test_util.h" | 10 #import "ios/chrome/test/app/tab_test_util.h" |
11 #include "ios/chrome/test/app/web_view_interaction_test_util.h" | 11 #include "ios/chrome/test/app/web_view_interaction_test_util.h" |
12 #import "ios/chrome/test/earl_grey/chrome_assertions.h" | 12 #import "ios/chrome/test/earl_grey/chrome_assertions.h" |
13 #import "ios/chrome/test/earl_grey/chrome_earl_grey.h" | 13 #import "ios/chrome/test/earl_grey/chrome_earl_grey.h" |
14 #import "ios/chrome/test/earl_grey/chrome_matchers.h" | 14 #import "ios/chrome/test/earl_grey/chrome_matchers.h" |
15 #import "ios/chrome/test/earl_grey/chrome_test_case.h" | 15 #import "ios/chrome/test/earl_grey/chrome_test_case.h" |
16 #import "ios/web/public/test/http_server.h" | 16 #import "ios/web/public/test/http_server/http_server.h" |
17 #include "ios/web/public/test/http_server_util.h" | 17 #include "ios/web/public/test/http_server/http_server_util.h" |
18 | 18 |
19 #if !defined(__has_feature) || !__has_feature(objc_arc) | 19 #if !defined(__has_feature) || !__has_feature(objc_arc) |
20 #error "This file requires ARC support." | 20 #error "This file requires ARC support." |
21 #endif | 21 #endif |
22 | 22 |
23 using chrome_test_util::AssertMainTabCount; | 23 using chrome_test_util::AssertMainTabCount; |
24 using chrome_test_util::TapWebViewElementWithId; | 24 using chrome_test_util::TapWebViewElementWithId; |
25 using chrome_test_util::WebViewContainingText; | 25 using chrome_test_util::WebViewContainingText; |
26 using web::test::HttpServer; | 26 using web::test::HttpServer; |
27 | 27 |
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
205 assertWithMatcher:grey_notNil()]; | 205 assertWithMatcher:grey_notNil()]; |
206 | 206 |
207 // Close the second opened window. Check that unnamed window 2 is closed. | 207 // Close the second opened window. Check that unnamed window 2 is closed. |
208 chrome_test_util::CloseTabAtIndex(1); | 208 chrome_test_util::CloseTabAtIndex(1); |
209 TapWebViewElementWithId(kCheckWindow2Link); | 209 TapWebViewElementWithId(kCheckWindow2Link); |
210 [[EarlGrey selectElementWithMatcher:WebViewContainingText(kWindow2Closed)] | 210 [[EarlGrey selectElementWithMatcher:WebViewContainingText(kWindow2Closed)] |
211 assertWithMatcher:grey_notNil()]; | 211 assertWithMatcher:grey_notNil()]; |
212 } | 212 } |
213 | 213 |
214 @end | 214 @end |
OLD | NEW |