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

Unified Diff: content/browser/renderer_host/render_process_host_browsertest.cc

Issue 10702029: Move tab functions off Browser into browser_tabstrip and browser_tabrestore. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/renderer_host/render_process_host_browsertest.cc
===================================================================
--- content/browser/renderer_host/render_process_host_browsertest.cc (revision 145001)
+++ content/browser/renderer_host/render_process_host_browsertest.cc (working copy)
@@ -8,6 +8,7 @@
#include "base/process.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/browser_commands.h"
+#include "chrome/browser/ui/browser_tabstrip.h"
#include "chrome/browser/ui/singleton_tabs.h"
#include "chrome/test/base/in_process_browser_test.h"
#include "chrome/test/base/ui_test_utils.h"
@@ -46,7 +47,7 @@
// handle.
base::ProcessHandle ShowSingletonTab(const GURL& page) {
chrome::ShowSingletonTab(browser(), page);
- WebContents* wc = browser()->GetActiveWebContents();
+ WebContents* wc = chrome::GetActiveWebContents(browser());
CHECK(wc->GetURL() == page);
// Ensure that the backgrounding / foregrounding gets a chance to run.
@@ -75,7 +76,7 @@
GURL newtab(chrome::kTestNewTabURL);
ui_test_utils::NavigateToURL(browser(), newtab);
EXPECT_EQ(tab_count, browser()->tab_count());
- tab1 = browser()->GetWebContentsAt(tab_count - 1);
+ tab1 = chrome::GetWebContentsAt(browser(), tab_count - 1);
rph1 = tab1->GetRenderProcessHost();
EXPECT_EQ(tab1->GetURL(), newtab);
EXPECT_EQ(host_count, RenderProcessHostCount());
@@ -88,7 +89,7 @@
tab_count++;
host_count++;
EXPECT_EQ(tab_count, browser()->tab_count());
- tab1 = browser()->GetWebContentsAt(tab_count - 1);
+ tab1 = chrome::GetWebContentsAt(browser(), tab_count - 1);
rph2 = tab1->GetRenderProcessHost();
EXPECT_EQ(tab1->GetURL(), page1);
EXPECT_EQ(host_count, RenderProcessHostCount());
@@ -101,7 +102,7 @@
ui_test_utils::WaitForNewTab(browser());
tab_count++;
EXPECT_EQ(tab_count, browser()->tab_count());
- tab2 = browser()->GetWebContentsAt(tab_count - 1);
+ tab2 = chrome::GetWebContentsAt(browser(), tab_count - 1);
EXPECT_EQ(tab2->GetURL(), page2);
EXPECT_EQ(host_count, RenderProcessHostCount());
EXPECT_EQ(tab2->GetRenderProcessHost(), rph2);
@@ -116,7 +117,7 @@
ui_test_utils::WaitForNewTab(browser());
tab_count++;
EXPECT_EQ(tab_count, browser()->tab_count());
- tab2 = browser()->GetWebContentsAt(tab_count - 1);
+ tab2 = chrome::GetWebContentsAt(browser(), tab_count - 1);
EXPECT_EQ(tab2->GetURL(), history);
EXPECT_EQ(host_count, RenderProcessHostCount());
EXPECT_EQ(tab2->GetRenderProcessHost(), rph1);
@@ -130,7 +131,7 @@
tab_count++;
host_count++;
EXPECT_EQ(tab_count, browser()->tab_count());
- tab1 = browser()->GetWebContentsAt(tab_count - 1);
+ tab1 = chrome::GetWebContentsAt(browser(), tab_count - 1);
rph3 = tab1->GetRenderProcessHost();
EXPECT_EQ(tab1->GetURL(), bookmarks);
EXPECT_EQ(host_count, RenderProcessHostCount());
« 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