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 #import <UIKit/UIKit.h> | 6 #import <UIKit/UIKit.h> |
7 #import <XCTest/XCTest.h> | 7 #import <XCTest/XCTest.h> |
8 | 8 |
9 #include "base/strings/sys_string_conversions.h" | 9 #include "base/strings/sys_string_conversions.h" |
10 #include "components/content_settings/core/browser/host_content_settings_map.h" | 10 #include "components/content_settings/core/browser/host_content_settings_map.h" |
11 #include "ios/chrome/browser/browser_state/chrome_browser_state.h" | 11 #include "ios/chrome/browser/browser_state/chrome_browser_state.h" |
12 #include "ios/chrome/browser/content_settings/host_content_settings_map_factory.
h" | 12 #include "ios/chrome/browser/content_settings/host_content_settings_map_factory.
h" |
13 #import "ios/chrome/test/app/chrome_test_util.h" | 13 #import "ios/chrome/test/app/chrome_test_util.h" |
14 #include "ios/chrome/test/app/web_view_interaction_test_util.h" | 14 #include "ios/chrome/test/app/web_view_interaction_test_util.h" |
15 #import "ios/chrome/test/earl_grey/chrome_assertions.h" | 15 #import "ios/chrome/test/earl_grey/chrome_assertions.h" |
16 #import "ios/chrome/test/earl_grey/chrome_earl_grey.h" | 16 #import "ios/chrome/test/earl_grey/chrome_earl_grey.h" |
17 #import "ios/chrome/test/earl_grey/chrome_matchers.h" | 17 #import "ios/chrome/test/earl_grey/chrome_matchers.h" |
18 #import "ios/chrome/test/earl_grey/chrome_test_case.h" | 18 #import "ios/chrome/test/earl_grey/chrome_test_case.h" |
19 #import "ios/web/public/test/http_server.h" | 19 #import "ios/web/public/test/http_server/http_server.h" |
20 #include "ios/web/public/test/http_server_util.h" | 20 #include "ios/web/public/test/http_server/http_server_util.h" |
21 #include "url/url_constants.h" | 21 #include "url/url_constants.h" |
22 | 22 |
23 #if !defined(__has_feature) || !__has_feature(objc_arc) | 23 #if !defined(__has_feature) || !__has_feature(objc_arc) |
24 #error "This file requires ARC support." | 24 #error "This file requires ARC support." |
25 #endif | 25 #endif |
26 | 26 |
27 namespace { | 27 namespace { |
28 | 28 |
29 // Timeout to use when waiting for a condition to be true. | 29 // Timeout to use when waiting for a condition to be true. |
30 const CFTimeInterval kConditionTimeout = 4.0; | 30 const CFTimeInterval kConditionTimeout = 4.0; |
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
168 conditionWithName:@"Wait for navigation to about:blank" | 168 conditionWithName:@"Wait for navigation to about:blank" |
169 block:^BOOL { | 169 block:^BOOL { |
170 const GURL& currentURL = | 170 const GURL& currentURL = |
171 chrome_test_util::GetCurrentWebState()->GetVisibleURL(); | 171 chrome_test_util::GetCurrentWebState()->GetVisibleURL(); |
172 return currentURL == GURL(url::kAboutBlankURL); | 172 return currentURL == GURL(url::kAboutBlankURL); |
173 }] waitWithTimeout:kConditionTimeout]; | 173 }] waitWithTimeout:kConditionTimeout]; |
174 chrome_test_util::AssertMainTabCount(1U); | 174 chrome_test_util::AssertMainTabCount(1U); |
175 } | 175 } |
176 | 176 |
177 @end | 177 @end |
OLD | NEW |