1 // Copyright 2014 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.
5 #ifndef IOS_WEB_PUBLIC_TEST_JS_TEST_UTIL_H_
6 #define IOS_WEB_PUBLIC_TEST_JS_TEST_UTIL_H_
8 #import <UIKit/UIKit.h>
9 #import <WebKit/WebKit.h>
11 @
class CRWJSInjectionManager
;
12 @
class CRWJSInjectionReceiver
;
16 // Evaluates JavaScript on the |manager| and returns the result as a string.
17 NSString
* EvaluateJavaScriptAsString(CRWJSInjectionManager
* manager
,
20 // Evaluates JavaScript on the |receiver| and returns the result as a string.
21 NSString
* EvaluateJavaScriptAsString(CRWJSInjectionReceiver
* receiver
,
24 // Evaluates JavaScript on |web_view| and returns the result as a string.
25 NSString
* EvaluateJavaScriptAsString(UIWebView
* web_view
, NSString
* script
);
27 // Evaluates JavaScript on |web_view| and returns the result as an id.
28 id
EvaluateJavaScript(WKWebView
* web_view
, NSString
* script
);
32 #endif // IOS_WEB_PUBLIC_TEST_JS_TEST_UTIL_H_