| 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 "base/command_line.h" | 5 #include "base/command_line.h" |
| 6 #include "chrome/browser/debugger/devtools_manager.h" | 6 #include "chrome/browser/debugger/devtools_manager.h" |
| 7 #include "chrome/browser/renderer_host/site_instance.h" | |
| 8 #include "chrome/browser/tab_contents/tab_contents.h" | |
| 9 #include "chrome/browser/renderer_host/render_process_host.h" | |
| 10 #include "chrome/browser/renderer_host/render_view_host.h" | |
| 11 #include "chrome/browser/renderer_host/render_widget_host.h" | |
| 12 #include "chrome/browser/ui/browser.h" | 7 #include "chrome/browser/ui/browser.h" |
| 13 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" | 8 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" |
| 14 #include "chrome/common/chrome_switches.h" | 9 #include "chrome/common/chrome_switches.h" |
| 15 #include "chrome/common/url_constants.h" | 10 #include "chrome/common/url_constants.h" |
| 16 #include "chrome/test/in_process_browser_test.h" | 11 #include "chrome/test/in_process_browser_test.h" |
| 17 #include "chrome/test/ui_test_utils.h" | 12 #include "chrome/test/ui_test_utils.h" |
| 13 #include "content/browser/renderer_host/render_process_host.h" |
| 14 #include "content/browser/renderer_host/render_view_host.h" |
| 15 #include "content/browser/renderer_host/render_widget_host.h" |
| 16 #include "content/browser/site_instance.h" |
| 17 #include "content/browser/tab_contents/tab_contents.h" |
| 18 | 18 |
| 19 class RenderProcessHostTest : public InProcessBrowserTest { | 19 class RenderProcessHostTest : public InProcessBrowserTest { |
| 20 public: | 20 public: |
| 21 RenderProcessHostTest() { | 21 RenderProcessHostTest() { |
| 22 EnableDOMAutomation(); | 22 EnableDOMAutomation(); |
| 23 } | 23 } |
| 24 | 24 |
| 25 int RenderProcessHostCount() { | 25 int RenderProcessHostCount() { |
| 26 RenderProcessHost::iterator hosts = RenderProcessHost::AllHostsIterator(); | 26 RenderProcessHost::iterator hosts = RenderProcessHost::AllHostsIterator(); |
| 27 int count = 0; | 27 int count = 0; |
| (...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 254 tab_count++; | 254 tab_count++; |
| 255 host_count++; | 255 host_count++; |
| 256 EXPECT_EQ(tab_count, browser()->tab_count()); | 256 EXPECT_EQ(tab_count, browser()->tab_count()); |
| 257 tab1 = browser()->GetTabContentsAt(tab_count - 1); | 257 tab1 = browser()->GetTabContentsAt(tab_count - 1); |
| 258 rph3 = tab1->GetRenderProcessHost(); | 258 rph3 = tab1->GetRenderProcessHost(); |
| 259 EXPECT_EQ(tab1->GetURL(), bookmarks); | 259 EXPECT_EQ(tab1->GetURL(), bookmarks); |
| 260 EXPECT_EQ(host_count, RenderProcessHostCount()); | 260 EXPECT_EQ(host_count, RenderProcessHostCount()); |
| 261 EXPECT_NE(rph1, rph3); | 261 EXPECT_NE(rph1, rph3); |
| 262 EXPECT_NE(rph2, rph3); | 262 EXPECT_NE(rph2, rph3); |
| 263 } | 263 } |
| OLD | NEW |