Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(174)

Side by Side Diff: ios/chrome/browser/web/browsing_prevent_default_egtest.mm

Issue 2890003002: [ObjC ARC] Converts ios/chrome/browser/web:eg_tests to ARC. (Closed)
Patch Set: Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ios/chrome/browser/web/browsing_egtest.mm ('k') | ios/chrome/browser/web/cache_egtest.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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.h"
20 #include "ios/web/public/test/http_server_util.h" 20 #include "ios/web/public/test/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)
24 #error "This file requires ARC support."
25 #endif
26
23 namespace { 27 namespace {
24 28
25 // Timeout to use when waiting for a condition to be true. 29 // Timeout to use when waiting for a condition to be true.
26 const CFTimeInterval kConditionTimeout = 4.0; 30 const CFTimeInterval kConditionTimeout = 4.0;
27 31
28 // Returns the URL for the HTML that is used for testing purposes in this file. 32 // Returns the URL for the HTML that is used for testing purposes in this file.
29 GURL GetTestUrl() { 33 GURL GetTestUrl() {
30 return web::test::HttpServer::MakeUrl( 34 return web::test::HttpServer::MakeUrl(
31 "http://ios/testing/data/http_server_files/" 35 "http://ios/testing/data/http_server_files/"
32 "browsing_prevent_default_test_page.html"); 36 "browsing_prevent_default_test_page.html");
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 conditionWithName:@"Wait for navigation to about:blank" 168 conditionWithName:@"Wait for navigation to about:blank"
165 block:^BOOL { 169 block:^BOOL {
166 const GURL& currentURL = 170 const GURL& currentURL =
167 chrome_test_util::GetCurrentWebState()->GetVisibleURL(); 171 chrome_test_util::GetCurrentWebState()->GetVisibleURL();
168 return currentURL == GURL(url::kAboutBlankURL); 172 return currentURL == GURL(url::kAboutBlankURL);
169 }] waitWithTimeout:kConditionTimeout]; 173 }] waitWithTimeout:kConditionTimeout];
170 chrome_test_util::AssertMainTabCount(1U); 174 chrome_test_util::AssertMainTabCount(1U);
171 } 175 }
172 176
173 @end 177 @end
OLDNEW
« no previous file with comments | « ios/chrome/browser/web/browsing_egtest.mm ('k') | ios/chrome/browser/web/cache_egtest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698