| 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 "ios/web/shell/test/earl_grey/shell_base_test_case.h" | 5 #import "ios/web/shell/test/earl_grey/shell_base_test_case.h" |
| 6 | 6 |
| 7 #import <EarlGrey/EarlGrey.h> | 7 #import <EarlGrey/EarlGrey.h> |
| 8 | 8 |
| 9 #import "ios/web/public/test/http_server.h" | 9 #import "ios/web/public/test/http_server.h" |
| 10 #import "ios/web/shell/test/earl_grey/shell_matchers.h" | 10 #import "ios/web/shell/test/earl_grey/shell_matchers.h" |
| 11 | 11 |
| 12 #if !defined(__has_feature) || !__has_feature(objc_arc) |
| 13 #error "This file requires ARC support." |
| 14 #endif |
| 15 |
| 12 using web::test::HttpServer; | 16 using web::test::HttpServer; |
| 13 using web::webViewContainingText; | 17 using web::webViewContainingText; |
| 14 | 18 |
| 15 @implementation ShellBaseTestCase | 19 @implementation ShellBaseTestCase |
| 16 | 20 |
| 17 // Set up called once for the class. | 21 // Set up called once for the class. |
| 18 + (void)setUp { | 22 + (void)setUp { |
| 19 [super setUp]; | 23 [super setUp]; |
| 20 [[EarlGrey selectElementWithMatcher:webViewContainingText("Chromium")] | 24 [[EarlGrey selectElementWithMatcher:webViewContainingText("Chromium")] |
| 21 assertWithMatcher:grey_notNil()]; | 25 assertWithMatcher:grey_notNil()]; |
| 22 HttpServer::GetSharedInstance().StartOrDie(); | 26 HttpServer::GetSharedInstance().StartOrDie(); |
| 23 } | 27 } |
| 24 | 28 |
| 25 // Tear down called once for the class. | 29 // Tear down called once for the class. |
| 26 + (void)tearDown { | 30 + (void)tearDown { |
| 27 HttpServer::GetSharedInstance().Stop(); | 31 HttpServer::GetSharedInstance().Stop(); |
| 28 [super tearDown]; | 32 [super tearDown]; |
| 29 } | 33 } |
| 30 | 34 |
| 31 // Tear down called after each test. | 35 // Tear down called after each test. |
| 32 - (void)tearDown { | 36 - (void)tearDown { |
| 33 HttpServer::GetSharedInstance().RemoveAllResponseProviders(); | 37 HttpServer::GetSharedInstance().RemoveAllResponseProviders(); |
| 34 [super tearDown]; | 38 [super tearDown]; |
| 35 } | 39 } |
| 36 | 40 |
| 37 @end | 41 @end |
| OLD | NEW |