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

Side by Side Diff: chrome/browser/ui/cocoa/web_intent_bubble_controller_unittest.mm

Issue 9148032: [Web Intents] Refactor picker to use WebIntentPickerModel. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 11 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #import "chrome/browser/ui/cocoa/cocoa_test_helper.h" 5 #import "chrome/browser/ui/cocoa/cocoa_test_helper.h"
6 #import "chrome/browser/ui/cocoa/hyperlink_button_cell.h" 6 #import "chrome/browser/ui/cocoa/hyperlink_button_cell.h"
7 #import "chrome/browser/ui/cocoa/info_bubble_window.h" 7 #import "chrome/browser/ui/cocoa/info_bubble_window.h"
8 #import "chrome/browser/ui/cocoa/web_intent_bubble_controller.h" 8 #import "chrome/browser/ui/cocoa/web_intent_bubble_controller.h"
9 #include "chrome/browser/ui/cocoa/web_intent_picker_cocoa.h" 9 #include "chrome/browser/ui/cocoa/web_intent_picker_cocoa.h"
10 #include "chrome/browser/ui/intents/web_intent_picker_delegate.h" 10 #include "chrome/browser/ui/intents/web_intent_picker_delegate.h"
11 11
12 namespace { 12 namespace {
13 13
14 class FakeIntentPickerDelegate : public WebIntentPickerDelegate { 14 class FakeIntentPickerDelegate : public WebIntentPickerDelegate {
15 public: 15 public:
16 virtual ~FakeIntentPickerDelegate() {} 16 virtual ~FakeIntentPickerDelegate() {}
17 virtual void OnServiceChosen(size_t index) {}; 17 virtual void OnServiceChosen(
18 size_t index, Disposition disposition) OVERRIDE {};
19 virtual void OnInlineDispositionWebContentsCreated(
20 content::WebContents* web_contents) OVERRIDE {}
18 21
19 // Callback called when the user cancels out of the dialog. 22 // Callback called when the user cancels out of the dialog.
20 virtual void OnCancelled() {}; 23 virtual void OnCancelled() OVERRIDE {};
21 virtual void OnClosing() {}; 24 virtual void OnClosing() OVERRIDE {};
22 }; 25 };
23 26
24 } // namespace 27 } // namespace
25 28
26 class WebIntentBubbleControllerTest : public CocoaTest { 29 class WebIntentBubbleControllerTest : public CocoaTest {
27 public: 30 public:
28 virtual void TearDown() { 31 virtual void TearDown() {
29 // Do not animate out because that is hard to test around. 32 // Do not animate out because that is hard to test around.
30 [window_ setDelayOnClose:NO]; 33 [window_ setDelayOnClose:NO];
31 [controller_ close]; 34 [controller_ close];
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 101
99 CheckWindow(/*icon_count=*/0); 102 CheckWindow(/*icon_count=*/0);
100 } 103 }
101 104
102 TEST_F(WebIntentBubbleControllerTest, PopulatedBubble) { 105 TEST_F(WebIntentBubbleControllerTest, PopulatedBubble) {
103 CreateBubble(); 106 CreateBubble();
104 [controller_ replaceImageAtIndex:2 withImage:nil]; 107 [controller_ replaceImageAtIndex:2 withImage:nil];
105 108
106 CheckWindow(/*icon_count=*/3); 109 CheckWindow(/*icon_count=*/3);
107 } 110 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698