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

Side by Side Diff: chrome/browser/ui/cocoa/web_intent_picker_test_base.h

Issue 10048005: Convert OSX intent picker unit tests to PlatformTests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed review issues Created 8 years, 8 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
(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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698