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/format_macros.h" | 7 #include "base/format_macros.h" |
8 #include "base/strings/stringprintf.h" | 8 #include "base/strings/stringprintf.h" |
9 #include "base/strings/sys_string_conversions.h" | 9 #include "base/strings/sys_string_conversions.h" |
10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
11 #import "base/test/ios/wait_util.h" | 11 #import "base/test/ios/wait_util.h" |
12 #include "components/content_settings/core/common/content_settings.h" | 12 #include "components/content_settings/core/common/content_settings.h" |
13 #include "ios/chrome/grit/ios_strings.h" | 13 #include "ios/chrome/grit/ios_strings.h" |
14 #include "ios/chrome/test/app/settings_test_util.h" | 14 #include "ios/chrome/test/app/settings_test_util.h" |
15 #import "ios/chrome/test/app/tab_test_util.h" | 15 #import "ios/chrome/test/app/tab_test_util.h" |
16 #include "ios/chrome/test/app/web_view_interaction_test_util.h" | 16 #include "ios/chrome/test/app/web_view_interaction_test_util.h" |
17 #import "ios/chrome/test/earl_grey/chrome_assertions.h" | 17 #import "ios/chrome/test/earl_grey/chrome_assertions.h" |
18 #import "ios/chrome/test/earl_grey/chrome_earl_grey.h" | 18 #import "ios/chrome/test/earl_grey/chrome_earl_grey.h" |
19 #import "ios/chrome/test/earl_grey/chrome_matchers.h" | 19 #import "ios/chrome/test/earl_grey/chrome_matchers.h" |
20 #import "ios/chrome/test/earl_grey/chrome_test_case.h" | 20 #import "ios/chrome/test/earl_grey/chrome_test_case.h" |
21 #import "ios/web/public/test/http_server.h" | 21 #import "ios/web/public/test/http_server/http_server.h" |
22 #include "ios/web/public/test/http_server_util.h" | 22 #include "ios/web/public/test/http_server/http_server_util.h" |
23 #include "ui/base/l10n/l10n_util.h" | 23 #include "ui/base/l10n/l10n_util.h" |
24 | 24 |
25 #if !defined(__has_feature) || !__has_feature(objc_arc) | 25 #if !defined(__has_feature) || !__has_feature(objc_arc) |
26 #error "This file requires ARC support." | 26 #error "This file requires ARC support." |
27 #endif | 27 #endif |
28 | 28 |
29 using chrome_test_util::AssertMainTabCount; | 29 using chrome_test_util::AssertMainTabCount; |
30 using chrome_test_util::OmniboxText; | 30 using chrome_test_util::OmniboxText; |
31 using chrome_test_util::TapWebViewElementWithId; | 31 using chrome_test_util::TapWebViewElementWithId; |
32 using chrome_test_util::WebViewContainingText; | 32 using chrome_test_util::WebViewContainingText; |
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
211 - (void)testBlockPopupInjectedIntoOpenedWindow { | 211 - (void)testBlockPopupInjectedIntoOpenedWindow { |
212 chrome_test_util::SetContentSettingsBlockPopups(CONTENT_SETTING_BLOCK); | 212 chrome_test_util::SetContentSettingsBlockPopups(CONTENT_SETTING_BLOCK); |
213 TapWebViewElementWithId("webScenarioOpenWindowAndInjectPopup"); | 213 TapWebViewElementWithId("webScenarioOpenWindowAndInjectPopup"); |
214 NSString* infobarText = GetBlockedPopupInfobarText(1); | 214 NSString* infobarText = GetBlockedPopupInfobarText(1); |
215 [[EarlGrey selectElementWithMatcher:grey_accessibilityLabel(infobarText)] | 215 [[EarlGrey selectElementWithMatcher:grey_accessibilityLabel(infobarText)] |
216 assertWithMatcher:grey_notNil()]; | 216 assertWithMatcher:grey_notNil()]; |
217 AssertMainTabCount(2); | 217 AssertMainTabCount(2); |
218 } | 218 } |
219 | 219 |
220 @end | 220 @end |
OLD | NEW |