Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(144)

Unified Diff: ios/web/public/test/web_test.h

Issue 2666953003: [ios] Automatically fail any WebTest whose render process crashes. (Closed)
Patch Set: Fix comment. Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ios/web/BUILD.gn ('k') | ios/web/public/test/web_test.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « ios/web/BUILD.gn ('k') | ios/web/public/test/web_test.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698