Chromium Code Reviews| OLD | NEW |
|---|---|
| 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(size_t index, Disposition disposition) {}; |
|
sail
2012/01/27 18:43:59
could you add OVERRIDE on all these virtual functi
binji
2012/01/27 19:04:20
Done.
| |
| 18 virtual void OnInlineDispositionWebContentsCreated( | |
| 19 content::WebContents* web_contents) {} | |
| 18 | 20 |
| 19 // Callback called when the user cancels out of the dialog. | 21 // Callback called when the user cancels out of the dialog. |
| 20 virtual void OnCancelled() {}; | 22 virtual void OnCancelled() {}; |
| 21 virtual void OnClosing() {}; | 23 virtual void OnClosing() {}; |
| 22 }; | 24 }; |
| 23 | 25 |
| 24 } // namespace | 26 } // namespace |
| 25 | 27 |
| 26 class WebIntentBubbleControllerTest : public CocoaTest { | 28 class WebIntentBubbleControllerTest : public CocoaTest { |
| 27 public: | 29 public: |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 98 | 100 |
| 99 CheckWindow(/*icon_count=*/0); | 101 CheckWindow(/*icon_count=*/0); |
| 100 } | 102 } |
| 101 | 103 |
| 102 TEST_F(WebIntentBubbleControllerTest, PopulatedBubble) { | 104 TEST_F(WebIntentBubbleControllerTest, PopulatedBubble) { |
| 103 CreateBubble(); | 105 CreateBubble(); |
| 104 [controller_ replaceImageAtIndex:2 withImage:nil]; | 106 [controller_ replaceImageAtIndex:2 withImage:nil]; |
| 105 | 107 |
| 106 CheckWindow(/*icon_count=*/3); | 108 CheckWindow(/*icon_count=*/3); |
| 107 } | 109 } |
| OLD | NEW |