| OLD | NEW |
| (Empty) |
| 1 // Copyright 2017 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_WEB_VIEW_TEST_WEB_VIEW_INTERACTION_TEST_UTIL_H_ | |
| 6 #define IOS_WEB_VIEW_TEST_WEB_VIEW_INTERACTION_TEST_UTIL_H_ | |
| 7 | |
| 8 #import <Foundation/Foundation.h> | |
| 9 | |
| 10 @class CWVWebView; | |
| 11 | |
| 12 namespace ios_web_view { | |
| 13 namespace test { | |
| 14 | |
| 15 // Returns whether the element with |element_id| in the passed |web_view| has | |
| 16 // been tapped using a JavaScript click() event. | |
| 17 bool TapChromeWebViewElementWithId(CWVWebView* web_view, NSString* element_id); | |
| 18 | |
| 19 // Waits until |script| is executed and synchronously returns the evaluation | |
| 20 // result. | |
| 21 id EvaluateJavaScript(CWVWebView* web_view, NSString* script, NSError** error); | |
| 22 | |
| 23 // Waits for |web_view| to contain |text|. Returns false if the condition is not | |
| 24 // met within a timeout. | |
| 25 bool WaitForWebViewContainingTextOrTimeout(CWVWebView* web_view, | |
| 26 NSString* text); | |
| 27 | |
| 28 } // namespace test | |
| 29 } // namespace ios_web_view | |
| 30 | |
| 31 #endif // IOS_WEB_VIEW_TEST_WEB_VIEW_INTERACTION_TEST_UTIL_H_ | |
| OLD | NEW |