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

Unified Diff: chrome/browser/browser_browsertest.cc

Issue 6693054: Get rid of extensions dependency from content\browser. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 9 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
« no previous file with comments | « no previous file | chrome/browser/chrome_content_browser_client.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/browser_browsertest.cc
===================================================================
--- chrome/browser/browser_browsertest.cc (revision 80243)
+++ chrome/browser/browser_browsertest.cc (working copy)
@@ -12,6 +12,7 @@
#include "chrome/browser/defaults.h"
#include "chrome/browser/extensions/extension_browsertest.h"
#include "chrome/browser/extensions/extension_service.h"
+#include "chrome/browser/extensions/extension_tab_helper.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/tabs/pinned_tab_codec.h"
#include "chrome/browser/tabs/tab_strip_model.h"
@@ -490,7 +491,7 @@
TabContentsWrapper* app_contents =
Browser::TabContentsFactory(browser()->profile(), NULL,
MSG_ROUTING_NONE, NULL, NULL);
- app_contents->tab_contents()->SetExtensionApp(extension_app);
+ app_contents->extension_tab_helper()->SetExtensionApp(extension_app);
model->AddTabContents(app_contents, 0, 0, TabStripModel::ADD_NONE);
model->SetTabPinned(0, true);
@@ -611,7 +612,7 @@
TabContentsWrapper* app_contents =
Browser::TabContentsFactory(browser()->profile(), NULL,
MSG_ROUTING_NONE, NULL, NULL);
- app_contents->tab_contents()->SetExtensionApp(extension_app);
+ app_contents->extension_tab_helper()->SetExtensionApp(extension_app);
model->AddTabContents(app_contents, 0, 0, TabStripModel::ADD_NONE);
model->SetTabPinned(0, true);
ui_test_utils::NavigateToURL(browser(), url);
@@ -664,7 +665,7 @@
new_model->GetTabContentsAt(2)->tab_contents()->GetURL());
EXPECT_TRUE(
- new_model->GetTabContentsAt(0)->tab_contents()->extension_app() ==
+ new_model->GetTabContentsAt(0)->extension_tab_helper()->extension_app() ==
extension_app);
}
#endif // !defined(OS_CHROMEOS)
@@ -696,7 +697,9 @@
// Apps launched in a window from the NTP do not have extension_app set in
// tab contents.
- EXPECT_FALSE(app_window->extension_app());
+ TabContentsWrapper* wrapper =
+ TabContentsWrapper::GetCurrentWrapperForContents(app_window);
+ EXPECT_FALSE(wrapper->extension_tab_helper()->extension_app());
EXPECT_EQ(extension_app->GetFullLaunchURL(), app_window->GetURL());
// The launch should have created a new browser.
« no previous file with comments | « no previous file | chrome/browser/chrome_content_browser_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698