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

Side by Side Diff: content/browser/renderer_host/render_process_host_browsertest.cc

Issue 10539134: TabContentsWrapper -> TabContents, part 57. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: last use Created 8 years, 6 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
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 "base/bind.h" 5 #include "base/bind.h"
6 #include "base/bind_helpers.h" 6 #include "base/bind_helpers.h"
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/process.h" 8 #include "base/process.h"
9 #include "chrome/browser/ui/browser.h" 9 #include "chrome/browser/ui/browser.h"
10 #include "chrome/test/base/in_process_browser_test.h" 10 #include "chrome/test/base/in_process_browser_test.h"
(...skipping 26 matching lines...) Expand all
37 hosts.Advance(); 37 hosts.Advance();
38 } 38 }
39 return count; 39 return count;
40 } 40 }
41 41
42 // Show a tab, activating the current one if there is one, and wait for 42 // Show a tab, activating the current one if there is one, and wait for
43 // the renderer process to be created or foregrounded, returning the process 43 // the renderer process to be created or foregrounded, returning the process
44 // handle. 44 // handle.
45 base::ProcessHandle ShowSingletonTab(const GURL& page) { 45 base::ProcessHandle ShowSingletonTab(const GURL& page) {
46 browser()->ShowSingletonTab(page); 46 browser()->ShowSingletonTab(page);
47 WebContents* wc = browser()->GetSelectedWebContents(); 47 WebContents* wc = browser()->GetActiveWebContents();
48 CHECK(wc->GetURL() == page); 48 CHECK(wc->GetURL() == page);
49 49
50 // Ensure that the backgrounding / foregrounding gets a chance to run. 50 // Ensure that the backgrounding / foregrounding gets a chance to run.
51 content::BrowserThread::PostTaskAndReply( 51 content::BrowserThread::PostTaskAndReply(
52 content::BrowserThread::PROCESS_LAUNCHER, FROM_HERE, 52 content::BrowserThread::PROCESS_LAUNCHER, FROM_HERE,
53 base::Bind(&base::DoNothing), MessageLoop::QuitClosure()); 53 base::Bind(&base::DoNothing), MessageLoop::QuitClosure());
54 MessageLoop::current()->Run(); 54 MessageLoop::current()->Run();
55 55
56 return wc->GetRenderProcessHost()->GetHandle(); 56 return wc->GetRenderProcessHost()->GetHandle();
57 } 57 }
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 // Set max renderers to 1 to force running out of processes. 238 // Set max renderers to 1 to force running out of processes.
239 content::RenderProcessHost::SetMaxRendererProcessCount(1); 239 content::RenderProcessHost::SetMaxRendererProcessCount(1);
240 TestProcessOverflow(); 240 TestProcessOverflow();
241 } 241 }
242 242
243 // Variation of the ProcessOverflow test, which is driven through command line 243 // Variation of the ProcessOverflow test, which is driven through command line
244 // parameter instead of direct function call into the class. 244 // parameter instead of direct function call into the class.
245 IN_PROC_BROWSER_TEST_F(RenderProcessHostTestWithCommandLine, ProcessOverflow) { 245 IN_PROC_BROWSER_TEST_F(RenderProcessHostTestWithCommandLine, ProcessOverflow) {
246 TestProcessOverflow(); 246 TestProcessOverflow();
247 } 247 }
OLDNEW
« no previous file with comments | « content/browser/plugin_browsertest.cc ('k') | content/browser/renderer_host/render_view_host_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698