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

Unified Diff: chrome/browser/tab_contents/web_contents_unittest.cc

Issue 5172009: This adds some plumbing for propagating the reason for a renderer's death (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Final review changes Created 10 years 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 | « chrome/browser/tab_contents/tab_contents.cc ('k') | chrome/browser/task_manager/task_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/tab_contents/web_contents_unittest.cc
diff --git a/chrome/browser/tab_contents/web_contents_unittest.cc b/chrome/browser/tab_contents/web_contents_unittest.cc
index abb1578ccf0f678384057886c6cfa55ad780ee27..67d93a376eea9b068c67fdf8bd4768586f14494e 100644
--- a/chrome/browser/tab_contents/web_contents_unittest.cc
+++ b/chrome/browser/tab_contents/web_contents_unittest.cc
@@ -120,8 +120,8 @@ class TestInterstitialPage : public InterstitialPage {
DidNavigate(render_view_host(), params);
}
- void TestRenderViewGone() {
- RenderViewGone(render_view_host());
+ void TestRenderViewGone(base::TerminationStatus status, int error_code) {
+ RenderViewGone(render_view_host(), status, error_code);
}
bool is_showing() const {
@@ -1151,7 +1151,9 @@ TEST_F(TabContentsTest, ShowInterstitialCrashRendererThenGoBack) {
interstitial->TestDidNavigate(2, interstitial_url);
// Crash the renderer
- rvh()->TestOnMessageReceived(ViewHostMsg_RenderViewGone(0));
+ rvh()->TestOnMessageReceived(
+ ViewHostMsg_RenderViewGone(
+ 0, base::TERMINATION_STATUS_PROCESS_CRASHED, -1));
// While the interstitial is showing, go back.
controller().GoBack();
@@ -1186,7 +1188,9 @@ TEST_F(TabContentsTest, ShowInterstitialCrashRendererThenNavigate) {
interstitial->Show();
// Crash the renderer
- rvh()->TestOnMessageReceived(ViewHostMsg_RenderViewGone(0));
+ rvh()->TestOnMessageReceived(
+ ViewHostMsg_RenderViewGone(
+ 0, base::TERMINATION_STATUS_PROCESS_CRASHED, -1));
interstitial->TestDidNavigate(2, interstitial_url);
}
@@ -1429,7 +1433,8 @@ TEST_F(TabContentsTest, InterstitialCrasher) {
TestInterstitialPageStateGuard state_guard(interstitial);
interstitial->Show();
// Simulate a renderer crash before the interstitial is shown.
- interstitial->TestRenderViewGone();
+ interstitial->TestRenderViewGone(
+ base::TERMINATION_STATUS_PROCESS_CRASHED, -1);
// The interstitial should have been dismissed.
EXPECT_TRUE(deleted);
EXPECT_EQ(TestInterstitialPage::CANCELED, state);
@@ -1440,7 +1445,8 @@ TEST_F(TabContentsTest, InterstitialCrasher) {
interstitial->Show();
interstitial->TestDidNavigate(1, url);
// Simulate a renderer crash.
- interstitial->TestRenderViewGone();
+ interstitial->TestRenderViewGone(
+ base::TERMINATION_STATUS_PROCESS_CRASHED, -1);
// The interstitial should have been dismissed.
EXPECT_TRUE(deleted);
EXPECT_EQ(TestInterstitialPage::CANCELED, state);
« no previous file with comments | « chrome/browser/tab_contents/tab_contents.cc ('k') | chrome/browser/task_manager/task_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698