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

Unified Diff: chrome/browser/extensions/extension_keybinding_apitest.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: chrome/browser/extensions/extension_keybinding_apitest.cc
===================================================================
--- chrome/browser/extensions/extension_keybinding_apitest.cc (revision 145001)
+++ chrome/browser/extensions/extension_keybinding_apitest.cc (working copy)
@@ -6,6 +6,7 @@
#include "chrome/browser/extensions/browser_action_test_util.h"
#include "chrome/browser/sessions/restore_tab_helper.h"
#include "chrome/browser/ui/browser.h"
+#include "chrome/browser/ui/browser_tabstrip.h"
#include "chrome/browser/ui/tab_contents/tab_contents.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/common/extensions/extension.h"
@@ -60,7 +61,7 @@
browser(), ui::VKEY_F, true, true, false, false));
// Verify the command worked.
- WebContents* tab = browser()->GetActiveWebContents();
+ WebContents* tab = chrome::GetActiveWebContents(browser());
bool result = false;
ASSERT_TRUE(ui_test_utils::ExecuteJavaScriptAndExtractBool(
tab->GetRenderViewHost(), L"",
@@ -101,8 +102,8 @@
// Make sure it appears and is the right one.
ASSERT_TRUE(WaitForPageActionVisibilityChangeTo(1));
- int tab_id = browser()->GetActiveTabContents()->
- restore_tab_helper()->session_id().id();
+ int tab_id = chrome::GetActiveTabContents(browser())->restore_tab_helper()->
+ session_id().id();
ExtensionAction* action = extension->page_action();
ASSERT_TRUE(action);
EXPECT_EQ("Make this page red", action->GetTitle(tab_id));
@@ -112,7 +113,7 @@
browser(), ui::VKEY_F, true, true, false, false));
// Verify the command worked (the page action turns the page red).
- WebContents* tab = browser()->GetActiveWebContents();
+ WebContents* tab = chrome::GetActiveWebContents(browser());
bool result = false;
ASSERT_TRUE(ui_test_utils::ExecuteJavaScriptAndExtractBool(
tab->GetRenderViewHost(), L"",
« no previous file with comments | « chrome/browser/extensions/extension_install_ui_default.cc ('k') | chrome/browser/extensions/extension_nacl_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698