OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "content/browser/renderer_host/render_process_host_browsertest.h" | 5 #include "content/browser/renderer_host/render_process_host_browsertest.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/process.h" | 9 #include "base/process.h" |
10 #include "chrome/browser/ui/browser.h" | 10 #include "chrome/browser/ui/browser.h" |
(...skipping 14 matching lines...) Expand all Loading... |
25 int count = 0; | 25 int count = 0; |
26 while (!hosts.IsAtEnd()) { | 26 while (!hosts.IsAtEnd()) { |
27 if (hosts.GetCurrentValue()->HasConnection()) | 27 if (hosts.GetCurrentValue()->HasConnection()) |
28 count++; | 28 count++; |
29 hosts.Advance(); | 29 hosts.Advance(); |
30 } | 30 } |
31 return count; | 31 return count; |
32 } | 32 } |
33 | 33 |
34 void PostQuit(MessageLoop* loop) { | 34 void PostQuit(MessageLoop* loop) { |
35 loop->PostTask(FROM_HERE, new MessageLoop::QuitTask); | 35 loop->PostTask(FROM_HERE, MessageLoop::QuitClosure()); |
36 } | 36 } |
37 | 37 |
38 void DoNothing() {} | 38 void DoNothing() {} |
39 | 39 |
40 // Show a tab, activating the current one if there is one, and wait for | 40 // Show a tab, activating the current one if there is one, and wait for |
41 // the renderer process to be created or foregrounded, returning the process | 41 // the renderer process to be created or foregrounded, returning the process |
42 // handle. | 42 // handle. |
43 base::ProcessHandle RenderProcessHostTest::ShowSingletonTab(const GURL& page) { | 43 base::ProcessHandle RenderProcessHostTest::ShowSingletonTab(const GURL& page) { |
44 browser()->ShowSingletonTab(page); | 44 browser()->ShowSingletonTab(page); |
45 TabContents* tc = browser()->GetSelectedTabContents(); | 45 TabContents* tc = browser()->GetSelectedTabContents(); |
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
229 host_count++; | 229 host_count++; |
230 #endif | 230 #endif |
231 EXPECT_EQ(tab_count, browser()->tab_count()); | 231 EXPECT_EQ(tab_count, browser()->tab_count()); |
232 tab1 = browser()->GetTabContentsAt(tab_count - 1); | 232 tab1 = browser()->GetTabContentsAt(tab_count - 1); |
233 rph3 = tab1->GetRenderProcessHost(); | 233 rph3 = tab1->GetRenderProcessHost(); |
234 EXPECT_EQ(tab1->GetURL(), bookmarks); | 234 EXPECT_EQ(tab1->GetURL(), bookmarks); |
235 EXPECT_EQ(host_count, RenderProcessHostCount()); | 235 EXPECT_EQ(host_count, RenderProcessHostCount()); |
236 EXPECT_NE(rph1, rph3); | 236 EXPECT_NE(rph1, rph3); |
237 EXPECT_NE(rph2, rph3); | 237 EXPECT_NE(rph2, rph3); |
238 } | 238 } |
OLD | NEW |