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

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

Issue 2945563002: ChromeWebView integration test for Incognito. (Closed)
Patch Set: Self review 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_TEST_UTIL_H_ 5 #ifndef IOS_WEB_VIEW_TEST_WEB_VIEW_TEST_UTIL_H_
6 #define IOS_WEB_VIEW_TEST_WEB_VIEW_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 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
11 11
12 @class CWVWebView; 12 @class CWVWebView;
13 @class CWVWebViewConfiguration;
13 14
14 namespace ios_web_view { 15 namespace ios_web_view {
15 namespace test { 16 namespace test {
16 17
18 // Creates web view with given |configuration| and frame equal to screen bounds.
19 CWVWebView* CreateWebView(CWVWebViewConfiguration* configuration)
20 WARN_UNUSED_RESULT;
21
17 // Creates web view with default configuration and frame equal to screen bounds. 22 // Creates web view with default configuration and frame equal to screen bounds.
18 CWVWebView* CreateWebView() WARN_UNUSED_RESULT; 23 CWVWebView* CreateWebView() WARN_UNUSED_RESULT;
19 24
20 // Loads |URL| in |web_view| and waits until the load completes. Asserts if 25 // Loads |URL| in |web_view| and waits until the load completes. Asserts if
21 // loading does not complete. 26 // loading does not complete.
22 bool LoadUrl(CWVWebView* web_view, NSURL* url) WARN_UNUSED_RESULT; 27 bool LoadUrl(CWVWebView* web_view, NSURL* url) WARN_UNUSED_RESULT;
23 28
24 // Returns whether the element with |element_id| in the passed |web_view| has 29 // Returns whether the element with |element_id| in the passed |web_view| has
25 // been tapped using a JavaScript click() event. 30 // been tapped using a JavaScript click() event.
26 bool TapWebViewElementWithId(CWVWebView* web_view, 31 bool TapWebViewElementWithId(CWVWebView* web_view,
(...skipping 10 matching lines...) Expand all
37 42
38 // Waits until |web_view| stops loading. Returns false if the condition is not 43 // Waits until |web_view| stops loading. Returns false if the condition is not
39 // met within a timeout. 44 // met within a timeout.
40 bool WaitForWebViewLoadCompletionOrTimeout(CWVWebView* web_view) 45 bool WaitForWebViewLoadCompletionOrTimeout(CWVWebView* web_view)
41 WARN_UNUSED_RESULT; 46 WARN_UNUSED_RESULT;
42 47
43 } // namespace test 48 } // namespace test
44 } // namespace ios_web_view 49 } // namespace ios_web_view
45 50
46 #endif // IOS_WEB_VIEW_TEST_WEB_VIEW_TEST_UTIL_H_ 51 #endif // IOS_WEB_VIEW_TEST_WEB_VIEW_TEST_UTIL_H_
OLDNEW
« no previous file with comments | « ios/web_view/test/web_view_incognito_inttest.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