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_TEST_WK_WEB_VIEW_CRASH_UTILS_H_
6 #define IOS_WEB_TEST_WK_WEB_VIEW_CRASH_UTILS_H_
8 #import <WebKit/WebKit.h>
12 // Simulates WKWebView crash by calling its private API.
13 void SimulateWKWebViewCrash(WKWebView
* webView
);
15 // Returns a specialized WKWebView mock object with overridden JavaScript
16 // evaluation method that fails with WKErrorWebContentProcessTerminated error.
17 WKWebView
* CreateTerminatedWKWebView();
19 // Returns a specialized WKWebView mock object with overridden JavaScript
20 // evaluation method that always succeeds with nil result.
21 WKWebView
* CreateHealthyWKWebView();
24 #endif // IOS_WEB_TEST_WK_WEB_VIEW_CRASH_UTILS_H_