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

Side by Side Diff: ios/web/public/test/earl_grey/js_test_util.h

Issue 2886573002: [ObjC ARC] Converts ios/web:earl_grey_test_support to ARC. (Closed)
Patch Set: autoreleasing Created 3 years, 7 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 2016 The Chromium Authors. All rights reserved. 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 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_PUBLIC_TEST_EARL_GREY_JS_TEST_UTIL_H_ 5 #ifndef IOS_WEB_PUBLIC_TEST_EARL_GREY_JS_TEST_UTIL_H_
6 #define IOS_WEB_PUBLIC_TEST_EARL_GREY_JS_TEST_UTIL_H_ 6 #define IOS_WEB_PUBLIC_TEST_EARL_GREY_JS_TEST_UTIL_H_
7 7
8 #import <Foundation/Foundation.h> 8 #import <Foundation/Foundation.h>
9 9
10 #import "ios/web/public/web_state/web_state.h" 10 #import "ios/web/public/web_state/web_state.h"
11 11
12 namespace web { 12 namespace web {
13 13
14 // Waits until the Window ID has been injected and the page is thus ready to 14 // Waits until the Window ID has been injected and the page is thus ready to
15 // respond to JavaScript injection. Fails with a GREYAssert on timeout or if 15 // respond to JavaScript injection. Fails with a GREYAssert on timeout or if
16 // unrecoverable error (such as no web view) occurs. 16 // unrecoverable error (such as no web view) occurs.
17 void WaitUntilWindowIdInjected(WebState* web_state); 17 void WaitUntilWindowIdInjected(WebState* web_state);
18 18
19 // Executes |javascript| on the given |web_state|, and waits until execution is 19 // Executes |javascript| on the given |web_state|, and waits until execution is
20 // completed. If |out_error| is not nil, it is set to the error resulting from 20 // completed. If |out_error| is not nil, it is set to the error resulting from
21 // the execution, if one occurs. The return value is the result of the 21 // the execution, if one occurs. The return value is the result of the
22 // JavaScript execution. If the script execution is timed out, then this method 22 // JavaScript execution. If the script execution is timed out, then this method
23 // fails with a GREYAssert. 23 // fails with a GREYAssert.
24 id ExecuteJavaScript(WebState* web_state, 24 id ExecuteJavaScript(WebState* web_state,
25 NSString* javascript, 25 NSString* javascript,
26 NSError** out_error); 26 NSError* __autoreleasing* out_error);
baxley 2017/05/16 20:12:48 This is one of the more interesting things I did.
stkhapugin 2017/05/30 13:21:38 This looks right to me.
27 27
28 // Synchronously returns the result of executed JavaScript on interstitial page 28 // Synchronously returns the result of executed JavaScript on interstitial page
29 // displayed for |web_state|. 29 // displayed for |web_state|.
30 id ExecuteScriptOnInterstitial(WebState* web_state, NSString* script); 30 id ExecuteScriptOnInterstitial(WebState* web_state, NSString* script);
31 31
32 } // namespace web 32 } // namespace web
33 33
34 #endif // IOS_WEB_PUBLIC_TEST_EARL_GREY_JS_TEST_UTIL_H_ 34 #endif // IOS_WEB_PUBLIC_TEST_EARL_GREY_JS_TEST_UTIL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698