Index: content/browser/webkit_browsertest.cc |
diff --git a/content/browser/webkit_browsertest.cc b/content/browser/webkit_browsertest.cc |
index 78c2f870260bed7ec828b85ff70eb5414067b30a..9bd8c678d48a40d75ce7f63c1098d621e3f2277e 100644 |
--- a/content/browser/webkit_browsertest.cc |
+++ b/content/browser/webkit_browsertest.cc |
@@ -55,4 +55,25 @@ IN_PROC_BROWSER_TEST_F(WebKitBrowserTest, XsltBadImport) { |
EXPECT_FALSE(shell()->web_contents()->IsCrashed()); |
} |
+// This is a browser test because DumpRenderTree has a PrerendererClient |
+// implementation, and the purpose of this test is to ensure that content_shell |
+// does not crash when prerender elements are encountered with no Prererering |
+// implementation supplied to WebKit. |
+ |
+// TODO(gavinp,jochen): This browser_test depends on there not being a |
+// prerendering client and prerendering platform provided by the test_shell. |
+// But both will exist when we use content_shell to run layout tests. We must |
+// then add a mechanism to start content_shell without these, or else this |
+// test is not very interesting. |
+const char kPrerenderNoCrashPage[] = |
+ "files/prerender/prerender-no-crash.html"; |
+IN_PROC_BROWSER_TEST_F(WebKitBrowserTest, PrerenderNoCrash) { |
+ ASSERT_TRUE(test_server()->Start()); |
+ GURL url = test_server()->GetURL(kPrerenderNoCrashPage); |
+ |
+ NavigateToURL(shell(), url); |
+ |
+ EXPECT_FALSE(shell()->web_contents()->IsCrashed()); |
+} |
+ |
} // namespace content |