QUIC - cleanup changes to sync chromium tree with internal source.
[chromium-blink-merge.git] / ios / web / public / test / js_test_util.h
blobcd16af17b0cdf4c9157c43837da241f3ddebbef6
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;
14 namespace web {
16 // Evaluates JavaScript on the |manager| and returns the result as a string.
17 NSString* EvaluateJavaScriptAsString(CRWJSInjectionManager* manager,
18 NSString* script);
20 // Evaluates JavaScript on the |receiver| and returns the result as a string.
21 NSString* EvaluateJavaScriptAsString(CRWJSInjectionReceiver* receiver,
22 NSString* script);
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);
30 } // namespace web
32 #endif // IOS_WEB_PUBLIC_TEST_JS_TEST_UTIL_H_