| 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/command_line.h" | 5 #include "base/command_line.h" |
| 6 #include "base/process/process.h" | 6 #include "base/process/process.h" |
| 7 #include "chrome/browser/chrome_notification_types.h" | 7 #include "chrome/browser/chrome_notification_types.h" |
| 8 #include "chrome/browser/devtools/devtools_window.h" | 8 #include "chrome/browser/devtools/devtools_window.h" |
| 9 #include "chrome/browser/search/search.h" | 9 #include "chrome/browser/search/search.h" |
| 10 #include "chrome/browser/ui/browser.h" | 10 #include "chrome/browser/ui/browser.h" |
| (...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 353 #define MAYBE_ProcessOverflow ProcessOverflow | 353 #define MAYBE_ProcessOverflow ProcessOverflow |
| 354 #endif | 354 #endif |
| 355 | 355 |
| 356 IN_PROC_BROWSER_TEST_F(ChromeRenderProcessHostTest, MAYBE_ProcessOverflow) { | 356 IN_PROC_BROWSER_TEST_F(ChromeRenderProcessHostTest, MAYBE_ProcessOverflow) { |
| 357 // Set max renderers to 1 to force running out of processes. | 357 // Set max renderers to 1 to force running out of processes. |
| 358 content::RenderProcessHost::SetMaxRendererProcessCount(1); | 358 content::RenderProcessHost::SetMaxRendererProcessCount(1); |
| 359 TestProcessOverflow(); | 359 TestProcessOverflow(); |
| 360 } | 360 } |
| 361 | 361 |
| 362 // Disable on Mac 10.9 due to ongoing flakiness. (crbug.com/442785) | 362 // Disable on Mac 10.9 due to ongoing flakiness. (crbug.com/442785) |
| 363 #if defined(OS_MACOSX) | 363 #if defined(OS_MACOSX) || defined(OS_WIN) |
| 364 #define MAYBE_ProcessOverflowCommandLine DISABLED_ProcessOverflow | 364 #define MAYBE_ProcessOverflowCommandLine DISABLED_ProcessOverflow |
| 365 #else | 365 #else |
| 366 #define MAYBE_ProcessOverflowCommandLine ProcessOverflow | 366 #define MAYBE_ProcessOverflowCommandLine ProcessOverflow |
| 367 #endif | 367 #endif |
| 368 | 368 |
| 369 // Variation of the ProcessOverflow test, which is driven through command line | 369 // Variation of the ProcessOverflow test, which is driven through command line |
| 370 // parameter instead of direct function call into the class. | 370 // parameter instead of direct function call into the class. |
| 371 IN_PROC_BROWSER_TEST_F(ChromeRenderProcessHostTestWithCommandLine, | 371 IN_PROC_BROWSER_TEST_F(ChromeRenderProcessHostTestWithCommandLine, |
| 372 MAYBE_ProcessOverflowCommandLine) { | 372 MAYBE_ProcessOverflowCommandLine) { |
| 373 TestProcessOverflow(); | 373 TestProcessOverflow(); |
| (...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 527 chrome::NOTIFICATION_BROWSER_CLOSED, | 527 chrome::NOTIFICATION_BROWSER_CLOSED, |
| 528 content::NotificationService::AllSources()); | 528 content::NotificationService::AllSources()); |
| 529 | 529 |
| 530 // Kill the renderer process, simulating a crash. This should the ProcessDied | 530 // Kill the renderer process, simulating a crash. This should the ProcessDied |
| 531 // method to be called. Alternatively, RenderProcessHost::OnChannelError can | 531 // method to be called. Alternatively, RenderProcessHost::OnChannelError can |
| 532 // be called to directly force a call to ProcessDied. | 532 // be called to directly force a call to ProcessDied. |
| 533 wc1->GetRenderProcessHost()->Shutdown(-1, true); | 533 wc1->GetRenderProcessHost()->Shutdown(-1, true); |
| 534 | 534 |
| 535 observer.Wait(); | 535 observer.Wait(); |
| 536 } | 536 } |
| OLD | NEW |