OLD | NEW |
| (Empty) |
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 | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef CHROME_BROWSER_UI_COCOA_WEB_INTENT_PICKER_TEST_BASE_H_ | |
6 #define CHROME_BROWSER_UI_COCOA_WEB_INTENT_PICKER_TEST_BASE_H_ | |
7 #pragma once | |
8 | |
9 #include "base/memory/scoped_ptr.h" | |
10 #include "chrome/browser/ui/intents/web_intent_picker_delegate.h" | |
11 #include "chrome/browser/ui/intents/web_intent_picker_model.h" | |
12 #include "testing/gmock/include/gmock/gmock.h" | |
13 | |
14 class TabContentsWrapper; | |
15 class WebIntentPickerCocoa; | |
16 @class WebIntentPickerSheetController; | |
17 | |
18 class MockIntentPickerDelegate : public WebIntentPickerDelegate { | |
19 public: | |
20 MockIntentPickerDelegate(); | |
21 virtual ~MockIntentPickerDelegate(); | |
22 | |
23 MOCK_METHOD2(OnServiceChosen, void(const GURL& url, Disposition disposition)); | |
24 MOCK_METHOD1(OnInlineDispositionWebContentsCreated, | |
25 void(content::WebContents* web_contents)); | |
26 MOCK_METHOD1(OnExtensionInstallRequested, void(const std::string& id)); | |
27 MOCK_METHOD0(OnCancelled, void()); | |
28 MOCK_METHOD0(OnClosing, void()); | |
29 }; | |
30 | |
31 class WebIntentPickerTestBase { | |
32 public: | |
33 WebIntentPickerTestBase(); | |
34 ~WebIntentPickerTestBase(); | |
35 | |
36 void CreateBubble(TabContentsWrapper* wrapper); | |
37 WebIntentPickerSheetController* controller_; // Weak, owns self. | |
38 NSWindow* window_; // Weak, owned by controller. | |
39 scoped_ptr<WebIntentPickerCocoa> picker_; | |
40 MockIntentPickerDelegate delegate_; | |
41 WebIntentPickerModel model_; // The model used by the picker | |
42 }; | |
43 | |
44 #endif // CHROME_BROWSER_UI_COCOA_WEB_INTENT_PICKER_TEST_BASE_H_ | |
OLD | NEW |