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 #ifndef IOS_CHROME_TEST_EARL_GREY_CHROME_TEST_CASE_H_ |
| 6 #define IOS_CHROME_TEST_EARL_GREY_CHROME_TEST_CASE_H_ |
| 7 |
| 8 #import <XCTest/XCTest.h> |
| 9 |
| 10 #include "base/ios/block_types.h" |
| 11 |
| 12 // Base class for all Chrome Earl Grey tests. |
| 13 @interface ChromeTestCase : XCTestCase |
| 14 |
| 15 // Sets a block to always be executed at the end of a test during tearDown, |
| 16 // whether the test passes or fails. This shall only be set once per test. |
| 17 - (void)setTearDownHandler:(ProceduralBlock)tearDownHandler; |
| 18 |
| 19 // Removes any UI elements that are present, to ensure it is in a clean state. |
| 20 + (void)removeAnyOpenMenusAndInfoBars; |
| 21 |
| 22 // Closes all tabs, and waits for the UI to synchronize. |
| 23 + (void)closeAllTabs; |
| 24 |
| 25 // Turns off mock authentication. It will automatically be re-enabled at the |
| 26 // end of the test. This shall only be called once per test. |
| 27 - (void)disableMockAuthentication; |
| 28 |
| 29 // Stops the HTTP server. It will be re-started at the end of the test. This |
| 30 // should only be called when the HTTP server is running. This shall only be |
| 31 // called once per test. |
| 32 - (void)stopHTTPServer; |
| 33 |
| 34 @end |
| 35 |
| 36 #endif // IOS_CHROME_TEST_EARL_GREY_CHROME_TEST_CASE_H_ |
OLD | NEW |