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

Unified Diff: content/browser/webkit_browsertest.cc

Issue 10869068: New WebKitBrowserTest for content_shell not providing a prerenderer client. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: ... add a comment. Created 8 years, 4 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 | « no previous file | content/test/data/prerender/prerender-no-crash.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « no previous file | content/test/data/prerender/prerender-no-crash.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698