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..e3473c8e50a91e8ac38e7528d923fdc7ac81362f 100644 |
--- a/ios/web/public/test/web_test.h |
+++ b/ios/web/public/test/web_test.h |
@@ -13,6 +13,7 @@ |
namespace web { |
class BrowserState; |
+class RendererCrashObserver; |
class TestWebClient; |
// A test fixture for web tests that need a minimum environment set up that |
@@ -32,6 +33,11 @@ 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. |
Eugene But (OOO till 7-30)
2017/02/01 16:43:04
Would it be helpful to document that default state
rohitrao (ping after 24h)
2017/02/01 18:22:59
Done.
|
+ void AllowRenderProcessCrashesDuringTesting(bool allow); |
Eugene But (OOO till 7-30)
2017/02/01 16:43:04
Should this be prefixed with Set (e.g. SetAllowsRe
rohitrao (ping after 24h)
2017/02/01 18:22:59
Done.
|
+ |
private: |
// The WebClient used in tests. |
ScopedTestingWebClient web_client_; |
@@ -39,6 +45,9 @@ class WebTest : public PlatformTest { |
web::TestWebThreadBundle thread_bundle_; |
// The browser state used in tests. |
TestBrowserState browser_state_; |
+ |
+ // Triggers test failures if a renderer process dies during the test. |
+ std::unique_ptr<RendererCrashObserver> renderer_crash_observer_; |
}; |
} // namespace web |