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

Side by Side Diff: chrome/browser/renderer_host/render_process_host_chrome_browsertest.cc

Issue 14113053: chrome: Use base::MessageLoop. (Part 3) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase again Created 7 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/command_line.h" 5 #include "base/command_line.h"
6 #include "chrome/browser/devtools/devtools_window.h" 6 #include "chrome/browser/devtools/devtools_window.h"
7 #include "chrome/browser/ui/browser.h" 7 #include "chrome/browser/ui/browser.h"
8 #include "chrome/browser/ui/browser_commands.h" 8 #include "chrome/browser/ui/browser_commands.h"
9 #include "chrome/browser/ui/singleton_tabs.h" 9 #include "chrome/browser/ui/singleton_tabs.h"
10 #include "chrome/browser/ui/tabs/tab_strip_model.h" 10 #include "chrome/browser/ui/tabs/tab_strip_model.h"
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 // the renderer process to be created or foregrounded, returning the process 71 // the renderer process to be created or foregrounded, returning the process
72 // handle. 72 // handle.
73 base::ProcessHandle ShowSingletonTab(const GURL& page) { 73 base::ProcessHandle ShowSingletonTab(const GURL& page) {
74 chrome::ShowSingletonTab(browser(), page); 74 chrome::ShowSingletonTab(browser(), page);
75 WebContents* wc = browser()->tab_strip_model()->GetActiveWebContents(); 75 WebContents* wc = browser()->tab_strip_model()->GetActiveWebContents();
76 CHECK(wc->GetURL() == page); 76 CHECK(wc->GetURL() == page);
77 77
78 // Ensure that the backgrounding / foregrounding gets a chance to run. 78 // Ensure that the backgrounding / foregrounding gets a chance to run.
79 content::BrowserThread::PostTaskAndReply( 79 content::BrowserThread::PostTaskAndReply(
80 content::BrowserThread::PROCESS_LAUNCHER, FROM_HERE, 80 content::BrowserThread::PROCESS_LAUNCHER, FROM_HERE,
81 base::Bind(&base::DoNothing), MessageLoop::QuitClosure()); 81 base::Bind(&base::DoNothing), base::MessageLoop::QuitClosure());
82 MessageLoop::current()->Run(); 82 base::MessageLoop::current()->Run();
83 83
84 return wc->GetRenderProcessHost()->GetHandle(); 84 return wc->GetRenderProcessHost()->GetHandle();
85 } 85 }
86 86
87 // When we hit the max number of renderers, verify that the way we do process 87 // When we hit the max number of renderers, verify that the way we do process
88 // sharing behaves correctly. In particular, this test is verifying that even 88 // sharing behaves correctly. In particular, this test is verifying that even
89 // when we hit the max process limit, that renderers of each type will wind up 89 // when we hit the max process limit, that renderers of each type will wind up
90 // in a process of that type, even if that means creating a new process. 90 // in a process of that type, even if that means creating a new process.
91 void TestProcessOverflow() { 91 void TestProcessOverflow() {
92 int tab_count = 1; 92 int tab_count = 1;
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after
355 RenderViewHost* devtools = FindFirstDevToolsHost(); 355 RenderViewHost* devtools = FindFirstDevToolsHost();
356 DCHECK(devtools); 356 DCHECK(devtools);
357 357
358 // DevTools start in a separate process. 358 // DevTools start in a separate process.
359 DevToolsWindow::ToggleDevToolsWindow( 359 DevToolsWindow::ToggleDevToolsWindow(
360 devtools, true, DEVTOOLS_TOGGLE_ACTION_INSPECT); 360 devtools, true, DEVTOOLS_TOGGLE_ACTION_INSPECT);
361 host_count++; 361 host_count++;
362 EXPECT_EQ(tab_count, browser()->tab_strip_model()->count()); 362 EXPECT_EQ(tab_count, browser()->tab_strip_model()->count());
363 EXPECT_EQ(host_count, RenderProcessHostCount()); 363 EXPECT_EQ(host_count, RenderProcessHostCount());
364 } 364 }
OLDNEW
« no previous file with comments | « chrome/browser/renderer_host/plugin_info_message_filter_unittest.cc ('k') | chrome/browser/renderer_host/web_cache_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698