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

Unified Diff: components/chooser_controller/mock_chooser_controller.h

Issue 2029863002: Refactor ChooserBubbleUiViewDelegate (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: make ChooserContentView::ChooserControllerDestroying a private function Created 4 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/chooser_controller/BUILD.gn ('k') | components/chooser_controller/mock_chooser_controller.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/chooser_controller/mock_chooser_controller.h
diff --git a/components/chooser_controller/mock_chooser_controller.h b/components/chooser_controller/mock_chooser_controller.h
new file mode 100644
index 0000000000000000000000000000000000000000..958db5d346a181e5c6b68069fc636166bdbb8f5c
--- /dev/null
+++ b/components/chooser_controller/mock_chooser_controller.h
@@ -0,0 +1,36 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef COMPONENTS_CHOOSER_CONTROLLER_MOCK_CHOOSER_CONTROLLER_H_
+#define COMPONENTS_CHOOSER_CONTROLLER_MOCK_CHOOSER_CONTROLLER_H_
+
+#include <vector>
+
+#include "base/macros.h"
+#include "components/chooser_controller/chooser_controller.h"
+#include "testing/gmock/include/gmock/gmock.h"
+
+class MockChooserController : public ChooserController {
+ public:
+ MockChooserController(content::RenderFrameHost* owner);
+ ~MockChooserController() override;
+
+ // ChooserController:
+ size_t NumOptions() const override;
+ const base::string16& GetOption(size_t index) const override;
+ MOCK_METHOD1(Select, void(size_t index));
+ MOCK_METHOD0(Cancel, void());
+ MOCK_METHOD0(Close, void());
+ MOCK_CONST_METHOD0(OpenHelpCenterUrl, void());
+
+ void OptionAdded(const base::string16 option_name);
+ void OptionRemoved(const base::string16 option_name);
+
+ private:
+ std::vector<base::string16> option_names_;
+
+ DISALLOW_COPY_AND_ASSIGN(MockChooserController);
+};
+
+#endif // COMPONENTS_CHOOSER_CONTROLLER_MOCK_CHOOSER_CONTROLLER_H_
« no previous file with comments | « components/chooser_controller/BUILD.gn ('k') | components/chooser_controller/mock_chooser_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698