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

Unified Diff: chrome/browser/ui/website_settings/mock_permission_bubble_view.h

Issue 787033004: Update geolocation permission tests for the permission bubble (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix compile warning/error Created 6 years 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
Index: chrome/browser/ui/website_settings/mock_permission_bubble_view.h
diff --git a/chrome/browser/ui/website_settings/mock_permission_bubble_view.h b/chrome/browser/ui/website_settings/mock_permission_bubble_view.h
new file mode 100644
index 0000000000000000000000000000000000000000..8d3177137453e9f628e76d34983dfc91b72ae28f
--- /dev/null
+++ b/chrome/browser/ui/website_settings/mock_permission_bubble_view.h
@@ -0,0 +1,43 @@
+// Copyright 2014 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 CHROME_BROWSER_UI_WEBSITE_SETTINGS_MOCK_PERMISSION_BUBBLE_VIEW_H_
+#define CHROME_BROWSER_UI_WEBSITE_SETTINGS_MOCK_PERMISSION_BUBBLE_VIEW_H_
+
+#include "chrome/browser/ui/website_settings/permission_bubble_request.h"
+#include "chrome/browser/ui/website_settings/permission_bubble_view.h"
+
+class MockPermissionBubbleView : public PermissionBubbleView {
+ public:
+ MockPermissionBubbleView();
+ ~MockPermissionBubbleView() override;
+
+ // PermissionBubbleView:
+ void SetDelegate(Delegate* delegate) override;
+ void Show(const std::vector<PermissionBubbleRequest*>& requests,
+ const std::vector<bool>& accept_state,
+ bool customization_state_) override;
+ bool CanAcceptRequestUpdate() override;
+ void Hide() override;
+ bool IsVisible() override;
+
+ // Wrappers that update the state of the bubble.
+ void Accept();
+ void Deny();
+ void Close();
+ void Clear();
+
+ // If we're in a browser test, we need to interact with the message loop.
+ // But that shouldn't be done in unit tests.
+ void SetBrowserTest(bool browser_test);
+
+ bool visible_;
timvolodine 2014/12/19 16:02:21 should the members be private?
felt 2014/12/19 16:46:31 Done.
+ bool can_accept_updates_;
+ Delegate* delegate_;
+ bool browser_test_;
+ std::vector<PermissionBubbleRequest*> permission_requests_;
+ std::vector<bool> permission_states_;
+};
+
+#endif // CHROME_BROWSER_UI_WEBSITE_SETTINGS_MOCK_PERMISSION_BUBBLE_VIEW_H_

Powered by Google App Engine
This is Rietveld 408576698