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