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 |