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

Unified Diff: chrome/browser/prerender/prerender_browsertest.cc

Issue 6879114: Cancels prerendering on prerendering RenderView crash (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 8 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
Index: chrome/browser/prerender/prerender_browsertest.cc
===================================================================
--- chrome/browser/prerender/prerender_browsertest.cc (revision 82535)
+++ chrome/browser/prerender/prerender_browsertest.cc (working copy)
@@ -17,6 +17,7 @@
#include "chrome/common/chrome_switches.h"
#include "chrome/test/in_process_browser_test.h"
#include "chrome/test/ui_test_utils.h"
+#include "content/browser/renderer_host/render_view_host.h"
#include "content/browser/tab_contents/tab_contents.h"
#include "grit/generated_resources.h"
#include "net/url_request/url_request_context.h"
@@ -77,6 +78,9 @@
if (expected_final_status_ == FINAL_STATUS_USED &&
number_of_loads_ >= expected_number_of_loads_) {
MessageLoopForUI::current()->Quit();
+ } else if (expected_final_status_ == FINAL_STATUS_RENDERER_CRASHED) {
+ // Crash the render process.
+ render_view_host()->NavigateToURL(GURL("about:crash"));
}
}
@@ -670,4 +674,12 @@
NavigateToDestURL();
}
+// Checks that prerenderers will terminate when the RenderView crashes.
+// Note that the prerendering RenderView will be redirected to about:crash.
+IN_PROC_BROWSER_TEST_F(PrerenderBrowserTest, PrerenderRendererCrash) {
+ PrerenderTestURL(CreateClientRedirect("files/prerender/prerender_page.html"),
+ FINAL_STATUS_RENDERER_CRASHED,
+ 1);
+}
+
} // namespace prerender
« no previous file with comments | « no previous file | chrome/browser/prerender/prerender_contents.h » ('j') | chrome/browser/prerender/prerender_contents.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698