| 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 using chrome_test_util::WebViewContainingText; | |
| 13 | |
| 14 // Test suite to verify Internet connectivity. | 12 // Test suite to verify Internet connectivity. |
| 15 @interface DeviceCheckTestCase : ChromeTestCase | 13 @interface DeviceCheckTestCase : ChromeTestCase |
| 16 @end | 14 @end |
| 17 | 15 |
| 18 @implementation DeviceCheckTestCase | 16 @implementation DeviceCheckTestCase |
| 19 | 17 |
| 20 // Verifies Internet connectivity by navigating to browsingtest.appspot.com. | 18 // Verifies Internet connectivity by navigating to browsingtest.appspot.com. |
| 21 - (void)testNetworkConnection { | 19 - (void)testNetworkConnection { |
| 22 [ChromeEarlGrey loadURL:GURL("http://browsingtest.appspot.com")]; | 20 [ChromeEarlGrey loadURL:GURL("http://browsingtest.appspot.com")]; |
| 23 [[EarlGrey selectElementWithMatcher:WebViewContainingText("Window1")] | 21 [ChromeEarlGrey waitForWebViewContainingText:@"Window1"]; |
| 24 assertWithMatcher:grey_notNil()]; | |
| 25 } | 22 } |
| 26 | 23 |
| 27 @end | 24 @end |
| OLD | NEW |