Chromium Code Reviews| 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 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 217 | 217 |
| 218 | 218 |
| 219 class ChromeRenderProcessHostTestWithCommandLine | 219 class ChromeRenderProcessHostTestWithCommandLine |
| 220 : public ChromeRenderProcessHostTest { | 220 : public ChromeRenderProcessHostTest { |
| 221 protected: | 221 protected: |
| 222 void SetUpCommandLine(base::CommandLine* command_line) override { | 222 void SetUpCommandLine(base::CommandLine* command_line) override { |
| 223 command_line->AppendSwitchASCII(switches::kRendererProcessLimit, "1"); | 223 command_line->AppendSwitchASCII(switches::kRendererProcessLimit, "1"); |
| 224 } | 224 } |
| 225 }; | 225 }; |
| 226 | 226 |
| 227 // Disable on Mac 10.9 due to ongoing flakiness. (crbug.com/442785) | 227 // Disable on Mac 10.9 due to ongoing flakiness. (crbug.com/442785) |
|
Lei Zhang
2015/02/09 19:51:11
This comment is slighty out of date, but otherwise
| |
| 228 #if defined(OS_MACOSX) | 228 #if defined(OS_MACOSX) || defined(OS_WIN) |
| 229 #define MAYBE_ProcessPerTab DISABLED_ProcessPerTab | 229 #define MAYBE_ProcessPerTab DISABLED_ProcessPerTab |
| 230 #else | 230 #else |
| 231 #define MAYBE_ProcessPerTab ProcessPerTab | 231 #define MAYBE_ProcessPerTab ProcessPerTab |
| 232 #endif | 232 #endif |
| 233 | 233 |
| 234 IN_PROC_BROWSER_TEST_F(ChromeRenderProcessHostTest, MAYBE_ProcessPerTab) { | 234 IN_PROC_BROWSER_TEST_F(ChromeRenderProcessHostTest, MAYBE_ProcessPerTab) { |
| 235 // Set max renderers to 1 to force running out of processes. | 235 // Set max renderers to 1 to force running out of processes. |
| 236 content::RenderProcessHost::SetMaxRendererProcessCount(1); | 236 content::RenderProcessHost::SetMaxRendererProcessCount(1); |
| 237 | 237 |
| 238 base::CommandLine& parsed_command_line = | 238 base::CommandLine& parsed_command_line = |
| (...skipping 288 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 |