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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | content/test/data/error-body-no-crash.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/web_contents/web_contents_impl.h" 5 #include "content/browser/web_contents/web_contents_impl.h"
6 #include "content/public/browser/web_contents.h" 6 #include "content/public/browser/web_contents.h"
7 #include "content/shell/shell.h" 7 #include "content/shell/shell.h"
8 #include "content/test/content_browser_test.h" 8 #include "content/test/content_browser_test.h"
9 #include "content/test/content_browser_test_utils.h" 9 #include "content/test/content_browser_test_utils.h"
10 #include "content/test/net/url_request_abort_on_end_job.h" 10 #include "content/test/net/url_request_abort_on_end_job.h"
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 "files/prerender/prerender-no-crash.html"; 69 "files/prerender/prerender-no-crash.html";
70 IN_PROC_BROWSER_TEST_F(WebKitBrowserTest, PrerenderNoCrash) { 70 IN_PROC_BROWSER_TEST_F(WebKitBrowserTest, PrerenderNoCrash) {
71 ASSERT_TRUE(test_server()->Start()); 71 ASSERT_TRUE(test_server()->Start());
72 GURL url = test_server()->GetURL(kPrerenderNoCrashPage); 72 GURL url = test_server()->GetURL(kPrerenderNoCrashPage);
73 73
74 NavigateToURL(shell(), url); 74 NavigateToURL(shell(), url);
75 75
76 EXPECT_FALSE(shell()->web_contents()->IsCrashed()); 76 EXPECT_FALSE(shell()->web_contents()->IsCrashed());
77 } 77 }
78 78
79 // This is a browser test because DumpRenderTree doesn't run nested message
80 // loops. The failure case was that a nested message triggered from an element
81 // that has signalled an error but had an open request would receive a body for
82 // the request and crash/fail an assertion.
83 const char kErrorBodyNoCrash[] =
84 "files/error-body-no-crash.html";
85 IN_PROC_BROWSER_TEST_F(WebKitBrowserTest, ErrorBodyNoCrash) {
86 ASSERT_TRUE(test_server()->Start());
87 GURL url = test_server()->GetURL(kErrorBodyNoCrash);
88
89 NavigateToURL(shell(), url);
90
91 EXPECT_FALSE(shell()->web_contents()->IsCrashed());
92 }
93
79 } // namespace content 94 } // namespace content
OLDNEW
« 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