OLD | NEW |
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 "base/string_util.h" | 5 #include "base/string_util.h" |
6 #include "base/utf_string_conversions.h" | 6 #include "base/utf_string_conversions.h" |
7 #include "content/browser/download/download_manager_impl.h" | 7 #include "content/browser/download/download_manager_impl.h" |
8 #include "content/browser/web_contents/web_contents_impl.h" | 8 #include "content/browser/web_contents/web_contents_impl.h" |
9 #include "content/public/browser/browser_context.h" | 9 #include "content/public/browser/browser_context.h" |
10 #include "content/public/browser/browser_thread.h" | 10 #include "content/public/browser/browser_thread.h" |
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
267 // We need to disable this on Mac because the crash causes the OS CrashReporter | 267 // We need to disable this on Mac because the crash causes the OS CrashReporter |
268 // process to kick in to analyze the poor dead renderer. Unfortunately, if the | 268 // process to kick in to analyze the poor dead renderer. Unfortunately, if the |
269 // app isn't stripped of debug symbols, this takes about five minutes to | 269 // app isn't stripped of debug symbols, this takes about five minutes to |
270 // complete and isn't conducive to quick turnarounds. As we don't currently | 270 // complete and isn't conducive to quick turnarounds. As we don't currently |
271 // strip the app on the build bots, this is bad times. | 271 // strip the app on the build bots, this is bad times. |
272 IN_PROC_BROWSER_TEST_F(ResourceDispatcherHostBrowserTest, CrossSiteAfterCrash) { | 272 IN_PROC_BROWSER_TEST_F(ResourceDispatcherHostBrowserTest, CrossSiteAfterCrash) { |
273 // Cause the renderer to crash. | 273 // Cause the renderer to crash. |
274 WindowedNotificationObserver crash_observer( | 274 WindowedNotificationObserver crash_observer( |
275 NOTIFICATION_RENDERER_PROCESS_CLOSED, | 275 NOTIFICATION_RENDERER_PROCESS_CLOSED, |
276 NotificationService::AllSources()); | 276 NotificationService::AllSources()); |
277 NavigateToURL(shell(), GURL(chrome::kChromeUICrashURL)); | 277 NavigateToURL(shell(), GURL(kChromeUICrashURL)); |
278 // Wait for browser to notice the renderer crash. | 278 // Wait for browser to notice the renderer crash. |
279 crash_observer.Wait(); | 279 crash_observer.Wait(); |
280 | 280 |
281 // Navigate to a new cross-site page. The browser should not wait around for | 281 // Navigate to a new cross-site page. The browser should not wait around for |
282 // the old renderer's on{before}unload handlers to run. | 282 // the old renderer's on{before}unload handlers to run. |
283 CheckTitleTest(GetMockURL("content-sniffer-test0.html"), | 283 CheckTitleTest(GetMockURL("content-sniffer-test0.html"), |
284 "Content Sniffer Test 0"); | 284 "Content Sniffer Test 0"); |
285 } | 285 } |
286 #endif // !defined(OS_MACOSX) | 286 #endif // !defined(OS_MACOSX) |
287 | 287 |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
392 CrossSiteFailedRequest) { | 392 CrossSiteFailedRequest) { |
393 // Visit another URL first to trigger a cross-site navigation. | 393 // Visit another URL first to trigger a cross-site navigation. |
394 NavigateToURL(shell(), GetTestUrl("", "simple_page.html")); | 394 NavigateToURL(shell(), GetTestUrl("", "simple_page.html")); |
395 | 395 |
396 // Visit a URL that fails without calling ResourceDispatcherHost::Read. | 396 // Visit a URL that fails without calling ResourceDispatcherHost::Read. |
397 GURL broken_url("chrome://theme"); | 397 GURL broken_url("chrome://theme"); |
398 NavigateToURL(shell(), broken_url); | 398 NavigateToURL(shell(), broken_url); |
399 } | 399 } |
400 | 400 |
401 } // namespace content | 401 } // namespace content |
OLD | NEW |