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

Unified Diff: content/browser/webkit_browsertest.cc

Issue 11778083: Test that 404 subresource bodies with nested message loops don't crash. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Created 7 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 | « no previous file | content/test/data/error-body-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 9bd8c678d48a40d75ce7f63c1098d621e3f2277e..24c24a60caa575c4012321aec8f108a3456cdd69 100644
--- a/content/browser/webkit_browsertest.cc
+++ b/content/browser/webkit_browsertest.cc
@@ -76,4 +76,19 @@ IN_PROC_BROWSER_TEST_F(WebKitBrowserTest, PrerenderNoCrash) {
EXPECT_FALSE(shell()->web_contents()->IsCrashed());
}
+// This is a browser test because DumpRenderTree doesn't run nested message
+// loops. The failure case was that a nested message triggered from an element
+// that has signalled an error but had an open request would receive a body for
+// the request and crash/fail an assertion.
+const char kErrorBodyNoCrash[] =
+ "files/error-body-no-crash.html";
+IN_PROC_BROWSER_TEST_F(WebKitBrowserTest, ErrorBodyNoCrash) {
+ ASSERT_TRUE(test_server()->Start());
+ GURL url = test_server()->GetURL(kErrorBodyNoCrash);
+
+ NavigateToURL(shell(), url);
+
+ EXPECT_FALSE(shell()->web_contents()->IsCrashed());
+}
+
} // namespace content
« no previous file with comments | « no previous file | content/test/data/error-body-no-crash.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698