Index: ios/web/public/test/web_test.h |
diff --git a/ios/web/public/test/web_test.h b/ios/web/public/test/web_test.h |
index b98550c90e8fc72f9957b64d3f474efd016712cd..27002abd4f36efc9ef409a3fcb913d44c22ed53c 100644 |
--- a/ios/web/public/test/web_test.h |
+++ b/ios/web/public/test/web_test.h |
@@ -14,6 +14,7 @@ namespace web { |
class BrowserState; |
class TestWebClient; |
+class WebTestRenderProcessCrashObserver; |
// A test fixture for web tests that need a minimum environment set up that |
// mimics a web embedder. |
@@ -32,6 +33,12 @@ class WebTest : public PlatformTest { |
// Returns the BrowserState that is used for testing. |
virtual BrowserState* GetBrowserState(); |
+ // If called with |true|, prevents the test fixture from automatically failing |
+ // when a render process crashes during the test. This is useful for tests |
+ // that intentionally crash the render process. By default, the WebTest |
+ // fixture will fail if a render process crashes. |
+ void SetIgnoreRenderProcessCrashesDuringTesting(bool allow); |
+ |
private: |
// The WebClient used in tests. |
ScopedTestingWebClient web_client_; |
@@ -39,6 +46,9 @@ class WebTest : public PlatformTest { |
web::TestWebThreadBundle thread_bundle_; |
// The browser state used in tests. |
TestBrowserState browser_state_; |
+ |
+ // Triggers test failures if a render process dies during the test. |
+ std::unique_ptr<WebTestRenderProcessCrashObserver> crash_observer_; |
}; |
} // namespace web |