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

Unified Diff: chrome/browser/ui/cocoa/location_bar/web_intents_button_decoration_unittest.mm

Issue 11418043: Remove TabContents from OmniboxEditController and friends. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: cros Created 8 years, 1 month 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/ui/cocoa/location_bar/web_intents_button_decoration_unittest.mm
diff --git a/chrome/browser/ui/cocoa/location_bar/web_intents_button_decoration_unittest.mm b/chrome/browser/ui/cocoa/location_bar/web_intents_button_decoration_unittest.mm
index 51d480271ac53fe7f9e6a30dd48479b00a039138..4a9feb7b62e0c8164ba75e67a7261ace7264d05f 100644
--- a/chrome/browser/ui/cocoa/location_bar/web_intents_button_decoration_unittest.mm
+++ b/chrome/browser/ui/cocoa/location_bar/web_intents_button_decoration_unittest.mm
@@ -6,10 +6,8 @@
#import "chrome/browser/ui/cocoa/location_bar/web_intents_button_decoration.h"
-#include "chrome/browser/ui/browser_tabstrip.h"
#import "chrome/browser/ui/cocoa/cocoa_profile_test.h"
#include "chrome/browser/ui/intents/web_intent_picker_controller.h"
-#include "chrome/browser/ui/tab_contents/tab_contents.h"
#include "content/public/browser/site_instance.h"
#include "content/public/browser/web_intents_dispatcher.h"
#include "ipc/ipc_message.h"
@@ -36,8 +34,9 @@ class WebIntentsButtonDecorationTest : public CocoaProfileTest {
TEST_F(WebIntentsButtonDecorationTest, IdentifiesWebIntentService) {
scoped_refptr<content::SiteInstance> instance =
content::SiteInstance::Create(profile());
- scoped_ptr<TabContents> contents(chrome::TabContentsFactory(
+ scoped_ptr<content::WebContents> contents(content::WebContents::Create(
profile(), instance.get(), MSG_ROUTING_NONE, NULL));
+ WebIntentPickerController::CreateForWebContents(contents.get());
decoration_.Update(contents.get());
EXPECT_FALSE(decoration_.IsVisible());
@@ -46,9 +45,9 @@ TEST_F(WebIntentsButtonDecorationTest, IdentifiesWebIntentService) {
content::WebIntentsDispatcher* dispatcher =
content::WebIntentsDispatcher::Create(data);
WebIntentPickerController* web_intent_picker_controller =
- WebIntentPickerController::FromWebContents(contents->web_contents());
+ WebIntentPickerController::FromWebContents(contents.get());
SetWindowDispositionSource(web_intent_picker_controller,
- contents->web_contents(), dispatcher);
+ contents.get(), dispatcher);
web_intent_picker_controller->SetLocationBarPickerButtonIndicated();
decoration_.Update(contents.get());
« no previous file with comments | « chrome/browser/ui/cocoa/location_bar/web_intents_button_decoration.mm ('k') | chrome/browser/ui/gtk/location_bar_view_gtk.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698