| 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 <XCTest/XCTest.h> | 5 #import <XCTest/XCTest.h> |
| 6 | 6 |
| 7 #import "ios/chrome/test/earl_grey/chrome_earl_grey.h" | 7 #import "ios/chrome/test/earl_grey/chrome_earl_grey.h" |
| 8 #import "ios/chrome/test/earl_grey/chrome_matchers.h" | 8 #import "ios/chrome/test/earl_grey/chrome_matchers.h" |
| 9 #import "ios/chrome/test/earl_grey/chrome_test_case.h" | 9 #import "ios/chrome/test/earl_grey/chrome_test_case.h" |
| 10 #include "url/gurl.h" | 10 #include "url/gurl.h" |
| 11 | 11 |
| 12 #if !defined(__has_feature) || !__has_feature(objc_arc) | 12 #if !defined(__has_feature) || !__has_feature(objc_arc) |
| 13 #error "This file requires ARC support." | 13 #error "This file requires ARC support." |
| 14 #endif | 14 #endif |
| 15 | 15 |
| 16 using chrome_test_util::WebViewContainingText; | 16 using chrome_test_util::WebViewContainingText; |
| 17 | 17 |
| 18 // Test suite to verify Internet connectivity. | 18 // Test suite to verify Internet connectivity. |
| 19 @interface DeviceCheckTestCase : ChromeTestCase | 19 @interface DeviceCheckTestCase : ChromeTestCase |
| 20 @end | 20 @end |
| 21 | 21 |
| 22 @implementation DeviceCheckTestCase | 22 @implementation DeviceCheckTestCase |
| 23 | 23 |
| 24 // Verifies Internet connectivity by navigating to browsingtest.appspot.com. | 24 // Verifies Internet connectivity by navigating to browsingtest.appspot.com. |
| 25 - (void)testNetworkConnection { | 25 - (void)testNetworkConnection { |
| 26 [ChromeEarlGrey loadURL:GURL("http://browsingtest.appspot.com")]; | 26 [ChromeEarlGrey loadURL:GURL("http://browsingtest.appspot.com")]; |
| 27 [[EarlGrey selectElementWithMatcher:WebViewContainingText("Window1")] | 27 [ChromeEarlGrey waitForWebViewContainingText:"Window1"]; |
| 28 assertWithMatcher:grey_notNil()]; | |
| 29 } | 28 } |
| 30 | 29 |
| 31 @end | 30 @end |
| OLD | NEW |