| 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/ios/ios_util.h" |    9 #include "base/ios/ios_util.h" | 
|   10 #include "base/mac/bind_objc_block.h" |   10 #include "base/mac/bind_objc_block.h" | 
|   11 #include "base/strings/stringprintf.h" |   11 #include "base/strings/stringprintf.h" | 
|   12 #include "base/strings/sys_string_conversions.h" |   12 #include "base/strings/sys_string_conversions.h" | 
|   13 #include "base/strings/utf_string_conversions.h" |   13 #include "base/strings/utf_string_conversions.h" | 
|   14 #import "ios/chrome/browser/ui/toolbar/toolbar_controller.h" |   14 #import "ios/chrome/browser/ui/toolbar/toolbar_controller.h" | 
|   15 #import "ios/chrome/test/app/chrome_test_util.h" |   15 #import "ios/chrome/test/app/chrome_test_util.h" | 
|   16 #import "ios/chrome/test/app/settings_test_util.h" |   16 #import "ios/chrome/test/app/settings_test_util.h" | 
|   17 #import "ios/chrome/test/app/web_view_interaction_test_util.h" |   17 #import "ios/chrome/test/app/web_view_interaction_test_util.h" | 
|   18 #include "ios/chrome/test/earl_grey/chrome_assertions.h" |   18 #include "ios/chrome/test/earl_grey/chrome_assertions.h" | 
|   19 #import "ios/chrome/test/earl_grey/chrome_earl_grey.h" |   19 #import "ios/chrome/test/earl_grey/chrome_earl_grey.h" | 
|   20 #import "ios/chrome/test/earl_grey/chrome_earl_grey_ui.h" |   20 #import "ios/chrome/test/earl_grey/chrome_earl_grey_ui.h" | 
|   21 #import "ios/chrome/test/earl_grey/chrome_matchers.h" |   21 #import "ios/chrome/test/earl_grey/chrome_matchers.h" | 
|   22 #import "ios/chrome/test/earl_grey/chrome_test_case.h" |   22 #import "ios/chrome/test/earl_grey/chrome_test_case.h" | 
|   23 #import "ios/testing/wait_util.h" |   23 #import "ios/testing/wait_util.h" | 
|   24 #import "ios/web/public/test/earl_grey/web_view_matchers.h" |   24 #import "ios/web/public/test/earl_grey/web_view_matchers.h" | 
|   25 #import "ios/web/public/test/http_server.h" |   25 #import "ios/web/public/test/http_server/error_page_response_provider.h" | 
|   26 #import "ios/web/public/test/http_server_util.h" |   26 #import "ios/web/public/test/http_server/http_server.h" | 
|   27 #import "ios/web/public/test/response_providers/error_page_response_provider.h" |   27 #include "ios/web/public/test/http_server/http_server_util.h" | 
|   28 #import "ios/web/public/test/web_view_interaction_test_util.h" |   28 #import "ios/web/public/test/web_view_interaction_test_util.h" | 
|   29 #include "url/gurl.h" |   29 #include "url/gurl.h" | 
|   30  |   30  | 
|   31 #if !defined(__has_feature) || !__has_feature(objc_arc) |   31 #if !defined(__has_feature) || !__has_feature(objc_arc) | 
|   32 #error "This file requires ARC support." |   32 #error "This file requires ARC support." | 
|   33 #endif |   33 #endif | 
|   34  |   34  | 
|   35 namespace { |   35 namespace { | 
|   36  |   36  | 
|   37 // TODO(crbug.com/638674): Move this to a shared location as it is a duplicate |   37 // TODO(crbug.com/638674): Move this to a shared location as it is a duplicate | 
| (...skipping 373 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  411   [ChromeEarlGrey loadURL:URL]; |  411   [ChromeEarlGrey loadURL:URL]; | 
|  412   HideToolbarUsingUI(); |  412   HideToolbarUsingUI(); | 
|  413   [ChromeEarlGreyUI waitForToolbarVisible:NO]; |  413   [ChromeEarlGreyUI waitForToolbarVisible:NO]; | 
|  414  |  414  | 
|  415   chrome_test_util::TapWebViewElementWithId("link"); |  415   chrome_test_util::TapWebViewElementWithId("link"); | 
|  416   AssertURLIs(ErrorPageResponseProvider::GetDnsFailureUrl()); |  416   AssertURLIs(ErrorPageResponseProvider::GetDnsFailureUrl()); | 
|  417   [ChromeEarlGreyUI waitForToolbarVisible:YES]; |  417   [ChromeEarlGreyUI waitForToolbarVisible:YES]; | 
|  418 } |  418 } | 
|  419  |  419  | 
|  420 @end |  420 @end | 
| OLD | NEW |