diff options
Diffstat (limited to 'ios/web/public/test/js_test_util.h')
-rw-r--r-- | ios/web/public/test/js_test_util.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/ios/web/public/test/js_test_util.h b/ios/web/public/test/js_test_util.h new file mode 100644 index 0000000..7dd4607 --- /dev/null +++ b/ios/web/public/test/js_test_util.h @@ -0,0 +1,21 @@ +// Copyright 2014 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef IOS_WEB_PUBLIC_TEST_JS_TEST_UTIL_H_ +#define IOS_WEB_PUBLIC_TEST_JS_TEST_UTIL_H_ + +@class CRWJSInjectionManager; +@class CRWJSInjectionReceiver; +@class NSString; + +namespace web { +// Evaluates JavaScript on the |manager| and returns the result as a string. +NSString* EvaluateJavaScriptAsString(CRWJSInjectionManager* manager, + NSString* script); +// Evaluates JavaScript on the |receiver| and returns the result as a string. +NSString* EvaluateJavaScriptAsString(CRWJSInjectionReceiver* receiver, + NSString* script); +} // namespace web + +#endif // IOS_WEB_PUBLIC_TEST_JS_TEST_UTIL_H_ |