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

Unified Diff: content/shell/renderer/test_runner/notification_presenter.h

Issue 183663021: Notification.permission's default value of "default" should be testable. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 6 years, 9 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
Index: content/shell/renderer/test_runner/notification_presenter.h
diff --git a/content/shell/renderer/test_runner/notification_presenter.h b/content/shell/renderer/test_runner/notification_presenter.h
index 9730f4a57d44cf7e600dddec2e32f39e46d3bf8c..ac3018155d4acdabd800172349f1c4d8bec3b4a9 100644
--- a/content/shell/renderer/test_runner/notification_presenter.h
+++ b/content/shell/renderer/test_runner/notification_presenter.h
@@ -6,7 +6,6 @@
#define CONTENT_SHELL_RENDERER_TEST_RUNNER_NOTIFICATION_PRESENTER_H_
#include <map>
-#include <set>
#include <string>
#include "base/basictypes.h"
@@ -26,7 +25,7 @@ class NotificationPresenter : public blink::WebNotificationPresenter {
virtual ~NotificationPresenter();
// Called by the TestRunner to simulate a user granting permission.
- void GrantPermission(const std::string& origin);
+ void GrantPermission(const std::string& origin, bool permission_granted);
// Called by the TestRunner to simulate a user clicking on a notification.
bool SimulateClick(const std::string& title);
@@ -54,8 +53,9 @@ class NotificationPresenter : public blink::WebNotificationPresenter {
private:
WebTestRunner::WebTestDelegate* delegate_;
- // Set of origins which are allowed to show notifications.
- std::set<std::string> allowed_origins_;
+ // Map of known origins and whether they are allowed to show notifications.
+ typedef std::map<std::string, bool> KnownOriginMap;
+ KnownOriginMap known_origins_;
// Map of currently active notifications.
typedef std::map<std::string, blink::WebNotification> ActiveNotificationMap;
« no previous file with comments | « content/shell/renderer/test_runner/TestRunner.cpp ('k') | content/shell/renderer/test_runner/notification_presenter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698