Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(581)

Side by Side Diff: ios/web_view/test/web_view_test_util.h

Issue 2941763003: Cleanup ios_web_view integration tests. (Closed)
Patch Set: Addressed review comments Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2017 The Chromium Authors. All rights reserved. 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 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 #ifndef IOS_WEB_VIEW_TEST_WEB_VIEW_INTERACTION_TEST_UTIL_H_ 5 #ifndef IOS_WEB_VIEW_TEST_WEB_VIEW_TEST_UTIL_H_
6 #define IOS_WEB_VIEW_TEST_WEB_VIEW_INTERACTION_TEST_UTIL_H_ 6 #define IOS_WEB_VIEW_TEST_WEB_VIEW_TEST_UTIL_H_
7 7
8 #import <Foundation/Foundation.h> 8 #import <Foundation/Foundation.h>
9 9
10 @class CWVWebView; 10 @class CWVWebView;
11 11
12 namespace ios_web_view { 12 namespace ios_web_view {
13 namespace test { 13 namespace test {
14 14
15 // Creates web view with default configuration and frame equal to screen bounds.
16 CWVWebView* CreateWebView();
17
15 // Returns whether the element with |element_id| in the passed |web_view| has 18 // Returns whether the element with |element_id| in the passed |web_view| has
16 // been tapped using a JavaScript click() event. 19 // been tapped using a JavaScript click() event.
17 bool TapChromeWebViewElementWithId(CWVWebView* web_view, NSString* element_id); 20 bool TapChromeWebViewElementWithId(CWVWebView* web_view, NSString* element_id);
18 21
19 // Waits until |script| is executed and synchronously returns the evaluation 22 // Waits until |script| is executed and synchronously returns the evaluation
20 // result. 23 // result.
21 id EvaluateJavaScript(CWVWebView* web_view, NSString* script, NSError** error); 24 id EvaluateJavaScript(CWVWebView* web_view, NSString* script, NSError** error);
22 25
23 // Waits for |web_view| to contain |text|. Returns false if the condition is not 26 // Waits for |web_view| to contain |text|. Returns false if the condition is not
24 // met within a timeout. 27 // met within a timeout.
25 bool WaitForWebViewContainingTextOrTimeout(CWVWebView* web_view, 28 bool WaitForWebViewContainingTextOrTimeout(CWVWebView* web_view,
26 NSString* text); 29 NSString* text);
27 30
28 } // namespace test 31 } // namespace test
29 } // namespace ios_web_view 32 } // namespace ios_web_view
30 33
31 #endif // IOS_WEB_VIEW_TEST_WEB_VIEW_INTERACTION_TEST_UTIL_H_ 34 #endif // IOS_WEB_VIEW_TEST_WEB_VIEW_TEST_UTIL_H_
OLDNEW
« no previous file with comments | « ios/web_view/test/web_view_interaction_test_util.mm ('k') | ios/web_view/test/web_view_test_util.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698