Commit e4fab30e authored by Sharon Yang's avatar Sharon Yang Committed by Commit Bot

Prefix Operation enum operations with OPERATION_

Replace an enum with an enum class, as preferred.

Change-Id: I657373e7a4f0d245a930341db7feff27a2f8fda5
Reviewed-on: https://chromium-review.googlesource.com/1118552Reviewed-by: default avatarYoshiki Iguchi <yoshiki@chromium.org>
Reviewed-by: default avatarPeter Beverloo <peter@chromium.org>
Commit-Queue: Sharon Yang <yangsharon@google.com>
Cr-Commit-Position: refs/heads/master@{#572573}
parent c035b5fc
...@@ -17,13 +17,12 @@ class NotificationCommon { ...@@ -17,13 +17,12 @@ class NotificationCommon {
public: public:
// Things as user can do to a notification. Keep in sync with the // Things as user can do to a notification. Keep in sync with the
// NotificationOperation enumeration in notification_response_builder_mac.h. // NotificationOperation enumeration in notification_response_builder_mac.h.
// TODO(peter): Prefix these options with OPERATION_.
enum Operation { enum Operation {
CLICK = 0, OPERATION_CLICK = 0,
CLOSE = 1, OPERATION_CLOSE = 1,
DISABLE_PERMISSION = 2, OPERATION_DISABLE_PERMISSION = 2,
SETTINGS = 3, OPERATION_SETTINGS = 3,
OPERATION_MAX = SETTINGS OPERATION_MAX = OPERATION_SETTINGS
}; };
// A struct that contains extra data about a notification specific to one of // A struct that contains extra data about a notification specific to one of
......
...@@ -158,19 +158,19 @@ void NotificationDisplayServiceImpl::ProcessNotificationOperation( ...@@ -158,19 +158,19 @@ void NotificationDisplayServiceImpl::ProcessNotificationOperation(
base::OnceClosure completed_closure = base::BindOnce(&OperationCompleted); base::OnceClosure completed_closure = base::BindOnce(&OperationCompleted);
switch (operation) { switch (operation) {
case NotificationCommon::CLICK: case NotificationCommon::OPERATION_CLICK:
handler->OnClick(profile_, origin, notification_id, action_index, reply, handler->OnClick(profile_, origin, notification_id, action_index, reply,
std::move(completed_closure)); std::move(completed_closure));
break; break;
case NotificationCommon::CLOSE: case NotificationCommon::OPERATION_CLOSE:
DCHECK(by_user.has_value()); DCHECK(by_user.has_value());
handler->OnClose(profile_, origin, notification_id, by_user.value(), handler->OnClose(profile_, origin, notification_id, by_user.value(),
std::move(completed_closure)); std::move(completed_closure));
break; break;
case NotificationCommon::DISABLE_PERMISSION: case NotificationCommon::OPERATION_DISABLE_PERMISSION:
handler->DisableNotifications(profile_, origin); handler->DisableNotifications(profile_, origin);
break; break;
case NotificationCommon::SETTINGS: case NotificationCommon::OPERATION_SETTINGS:
handler->OpenSettings(profile_, origin); handler->OpenSettings(profile_, origin);
break; break;
} }
......
...@@ -167,7 +167,7 @@ void NotificationPlatformBridgeAndroid::OnNotificationClicked( ...@@ -167,7 +167,7 @@ void NotificationPlatformBridgeAndroid::OnNotificationClicked(
profile_manager->LoadProfile( profile_manager->LoadProfile(
profile_id, incognito, profile_id, incognito,
base::Bind(&NotificationDisplayServiceImpl::ProfileLoadedCallback, base::Bind(&NotificationDisplayServiceImpl::ProfileLoadedCallback,
NotificationCommon::CLICK, NotificationCommon::OPERATION_CLICK,
NotificationHandler::Type::WEB_PERSISTENT, origin, NotificationHandler::Type::WEB_PERSISTENT, origin,
notification_id, std::move(action_index), std::move(reply), notification_id, std::move(action_index), std::move(reply),
base::nullopt /* by_user */)); base::nullopt /* by_user */));
...@@ -213,7 +213,7 @@ void NotificationPlatformBridgeAndroid::OnNotificationClosed( ...@@ -213,7 +213,7 @@ void NotificationPlatformBridgeAndroid::OnNotificationClosed(
profile_manager->LoadProfile( profile_manager->LoadProfile(
profile_id, incognito, profile_id, incognito,
base::Bind(&NotificationDisplayServiceImpl::ProfileLoadedCallback, base::Bind(&NotificationDisplayServiceImpl::ProfileLoadedCallback,
NotificationCommon::CLOSE, NotificationCommon::OPERATION_CLOSE,
NotificationHandler::Type::WEB_PERSISTENT, NotificationHandler::Type::WEB_PERSISTENT,
GURL(ConvertJavaStringToUTF8(env, java_origin)), GURL(ConvertJavaStringToUTF8(env, java_origin)),
notification_id, base::nullopt /* action index */, notification_id, base::nullopt /* action index */,
......
...@@ -126,7 +126,7 @@ void NotificationPlatformBridgeChromeOs::HandleNotificationClosed( ...@@ -126,7 +126,7 @@ void NotificationPlatformBridgeChromeOs::HandleNotificationClosed(
} else { } else {
NotificationDisplayServiceImpl::GetForProfile(notification->profile()) NotificationDisplayServiceImpl::GetForProfile(notification->profile())
->ProcessNotificationOperation( ->ProcessNotificationOperation(
NotificationCommon::CLOSE, notification->type(), NotificationCommon::OPERATION_CLOSE, notification->type(),
notification->notification().origin_url(), notification->notification().origin_url(),
notification->original_id(), base::nullopt, base::nullopt, by_user); notification->original_id(), base::nullopt, base::nullopt, by_user);
} }
...@@ -145,7 +145,7 @@ void NotificationPlatformBridgeChromeOs::HandleNotificationClicked( ...@@ -145,7 +145,7 @@ void NotificationPlatformBridgeChromeOs::HandleNotificationClicked(
} else { } else {
NotificationDisplayServiceImpl::GetForProfile(notification->profile()) NotificationDisplayServiceImpl::GetForProfile(notification->profile())
->ProcessNotificationOperation( ->ProcessNotificationOperation(
NotificationCommon::CLICK, notification->type(), NotificationCommon::OPERATION_CLICK, notification->type(),
notification->notification().origin_url(), notification->notification().origin_url(),
notification->original_id(), base::nullopt, base::nullopt, notification->original_id(), base::nullopt, base::nullopt,
base::nullopt); base::nullopt);
...@@ -165,7 +165,7 @@ void NotificationPlatformBridgeChromeOs::HandleNotificationButtonClicked( ...@@ -165,7 +165,7 @@ void NotificationPlatformBridgeChromeOs::HandleNotificationButtonClicked(
} else { } else {
NotificationDisplayServiceImpl::GetForProfile(notification->profile()) NotificationDisplayServiceImpl::GetForProfile(notification->profile())
->ProcessNotificationOperation( ->ProcessNotificationOperation(
NotificationCommon::CLICK, notification->type(), NotificationCommon::OPERATION_CLICK, notification->type(),
notification->notification().origin_url(), notification->notification().origin_url(),
notification->original_id(), button_index, reply, base::nullopt); notification->original_id(), button_index, reply, base::nullopt);
} }
...@@ -182,7 +182,7 @@ void NotificationPlatformBridgeChromeOs:: ...@@ -182,7 +182,7 @@ void NotificationPlatformBridgeChromeOs::
} else { } else {
NotificationDisplayServiceImpl::GetForProfile(notification->profile()) NotificationDisplayServiceImpl::GetForProfile(notification->profile())
->ProcessNotificationOperation( ->ProcessNotificationOperation(
NotificationCommon::SETTINGS, notification->type(), NotificationCommon::OPERATION_SETTINGS, notification->type(),
notification->notification().origin_url(), notification->notification().origin_url(),
notification->original_id(), base::nullopt, base::nullopt, notification->original_id(), base::nullopt, base::nullopt,
base::nullopt); base::nullopt);
...@@ -197,11 +197,11 @@ void NotificationPlatformBridgeChromeOs::DisableNotification( ...@@ -197,11 +197,11 @@ void NotificationPlatformBridgeChromeOs::DisableNotification(
DCHECK_NE(NotificationHandler::Type::TRANSIENT, notification->type()); DCHECK_NE(NotificationHandler::Type::TRANSIENT, notification->type());
NotificationDisplayServiceImpl::GetForProfile(notification->profile()) NotificationDisplayServiceImpl::GetForProfile(notification->profile())
->ProcessNotificationOperation(NotificationCommon::DISABLE_PERMISSION, ->ProcessNotificationOperation(
notification->type(), NotificationCommon::OPERATION_DISABLE_PERMISSION,
notification->notification().origin_url(), notification->type(), notification->notification().origin_url(),
notification->original_id(), base::nullopt, notification->original_id(), base::nullopt, base::nullopt,
base::nullopt, base::nullopt); base::nullopt);
} }
ProfileNotification* NotificationPlatformBridgeChromeOs::GetProfileNotification( ProfileNotification* NotificationPlatformBridgeChromeOs::GetProfileNotification(
......
...@@ -787,12 +787,12 @@ class NotificationPlatformBridgeLinuxImpl ...@@ -787,12 +787,12 @@ class NotificationPlatformBridgeLinuxImpl
return; return;
if (action == kDefaultButtonId) { if (action == kDefaultButtonId) {
ForwardNotificationOperation(FROM_HERE, data, NotificationCommon::CLICK, ForwardNotificationOperation(
base::nullopt /* action_index */, FROM_HERE, data, NotificationCommon::OPERATION_CLICK,
base::nullopt /* by_user */); base::nullopt /* action_index */, base::nullopt /* by_user */);
} else if (action == kSettingsButtonId) { } else if (action == kSettingsButtonId) {
ForwardNotificationOperation( ForwardNotificationOperation(
FROM_HERE, data, NotificationCommon::SETTINGS, FROM_HERE, data, NotificationCommon::OPERATION_SETTINGS,
base::nullopt /* action_index */, base::nullopt /* by_user */); base::nullopt /* action_index */, base::nullopt /* by_user */);
} else if (action == kCloseButtonId) { } else if (action == kCloseButtonId) {
CloseOnTaskRunner(data->profile_id, data->notification_id); CloseOnTaskRunner(data->profile_id, data->notification_id);
...@@ -804,7 +804,8 @@ class NotificationPlatformBridgeLinuxImpl ...@@ -804,7 +804,8 @@ class NotificationPlatformBridgeLinuxImpl
size_t id_zero_based = id - data->action_start; size_t id_zero_based = id - data->action_start;
if (id_zero_based >= n_buttons) if (id_zero_based >= n_buttons)
return; return;
ForwardNotificationOperation(FROM_HERE, data, NotificationCommon::CLICK, ForwardNotificationOperation(FROM_HERE, data,
NotificationCommon::OPERATION_CLICK,
id_zero_based, base::nullopt /* by_user */); id_zero_based, base::nullopt /* by_user */);
} }
} }
...@@ -821,9 +822,9 @@ class NotificationPlatformBridgeLinuxImpl ...@@ -821,9 +822,9 @@ class NotificationPlatformBridgeLinuxImpl
return; return;
// TODO(peter): Can we support |by_user| appropriately here? // TODO(peter): Can we support |by_user| appropriately here?
ForwardNotificationOperation(FROM_HERE, data, NotificationCommon::CLOSE, ForwardNotificationOperation(
base::nullopt /* action_index */, FROM_HERE, data, NotificationCommon::OPERATION_CLOSE,
true /* by_user */); base::nullopt /* action_index */, true /* by_user */);
notifications_.erase(data); notifications_.erase(data);
} }
......
...@@ -34,7 +34,7 @@ class PassThroughDelegate : public message_center::NotificationDelegate { ...@@ -34,7 +34,7 @@ class PassThroughDelegate : public message_center::NotificationDelegate {
void SettingsClick() override { void SettingsClick() override {
NotificationDisplayServiceImpl::GetForProfile(profile_) NotificationDisplayServiceImpl::GetForProfile(profile_)
->ProcessNotificationOperation( ->ProcessNotificationOperation(
NotificationCommon::SETTINGS, notification_type_, NotificationCommon::OPERATION_SETTINGS, notification_type_,
notification_.origin_url(), notification_.id(), base::nullopt, notification_.origin_url(), notification_.id(), base::nullopt,
base::nullopt, base::nullopt /* by_user */); base::nullopt, base::nullopt /* by_user */);
} }
...@@ -42,8 +42,8 @@ class PassThroughDelegate : public message_center::NotificationDelegate { ...@@ -42,8 +42,8 @@ class PassThroughDelegate : public message_center::NotificationDelegate {
void DisableNotification() override { void DisableNotification() override {
NotificationDisplayServiceImpl::GetForProfile(profile_) NotificationDisplayServiceImpl::GetForProfile(profile_)
->ProcessNotificationOperation( ->ProcessNotificationOperation(
NotificationCommon::DISABLE_PERMISSION, notification_type_, NotificationCommon::OPERATION_DISABLE_PERMISSION,
notification_.origin_url(), notification_.id(), notification_type_, notification_.origin_url(), notification_.id(),
base::nullopt /* action_index */, base::nullopt /* reply */, base::nullopt /* action_index */, base::nullopt /* reply */,
base::nullopt /* by_user */); base::nullopt /* by_user */);
} }
...@@ -51,7 +51,7 @@ class PassThroughDelegate : public message_center::NotificationDelegate { ...@@ -51,7 +51,7 @@ class PassThroughDelegate : public message_center::NotificationDelegate {
void Close(bool by_user) override { void Close(bool by_user) override {
NotificationDisplayServiceImpl::GetForProfile(profile_) NotificationDisplayServiceImpl::GetForProfile(profile_)
->ProcessNotificationOperation( ->ProcessNotificationOperation(
NotificationCommon::CLOSE, notification_type_, NotificationCommon::OPERATION_CLOSE, notification_type_,
notification_.origin_url(), notification_.id(), notification_.origin_url(), notification_.id(),
base::nullopt /* action_index */, base::nullopt /* reply */, base::nullopt /* action_index */, base::nullopt /* reply */,
by_user); by_user);
...@@ -61,7 +61,7 @@ class PassThroughDelegate : public message_center::NotificationDelegate { ...@@ -61,7 +61,7 @@ class PassThroughDelegate : public message_center::NotificationDelegate {
const base::Optional<base::string16>& reply) override { const base::Optional<base::string16>& reply) override {
NotificationDisplayServiceImpl::GetForProfile(profile_) NotificationDisplayServiceImpl::GetForProfile(profile_)
->ProcessNotificationOperation( ->ProcessNotificationOperation(
NotificationCommon::CLICK, notification_type_, NotificationCommon::OPERATION_CLICK, notification_type_,
notification_.origin_url(), notification_.id(), button_index, reply, notification_.origin_url(), notification_.id(), button_index, reply,
base::nullopt /* by_user */); base::nullopt /* by_user */);
} }
......
...@@ -691,7 +691,7 @@ class NotificationPlatformBridgeWinImpl ...@@ -691,7 +691,7 @@ class NotificationPlatformBridgeWinImpl
DLOG(ERROR) << "Failed to get toast dismissal reason: " << std::hex << hr; DLOG(ERROR) << "Failed to get toast dismissal reason: " << std::hex << hr;
} }
HandleEvent(notification, NotificationCommon::CLOSE, HandleEvent(notification, NotificationCommon::OPERATION_CLOSE,
/*action_index=*/base::nullopt, by_user); /*action_index=*/base::nullopt, by_user);
return S_OK; return S_OK;
} }
...@@ -839,9 +839,9 @@ bool NotificationPlatformBridgeWin::HandleActivation( ...@@ -839,9 +839,9 @@ bool NotificationPlatformBridgeWin::HandleActivation(
if (!inline_reply.empty()) if (!inline_reply.empty())
reply = inline_reply; reply = inline_reply;
NotificationCommon::Operation operation = launch_id.is_for_context_menu() NotificationCommon::Operation operation =
? NotificationCommon::SETTINGS launch_id.is_for_context_menu() ? NotificationCommon::OPERATION_SETTINGS
: NotificationCommon::CLICK; : NotificationCommon::OPERATION_CLICK;
ForwardNotificationOperationOnUiThread( ForwardNotificationOperationOnUiThread(
operation, launch_id.notification_type(), launch_id.origin_url(), operation, launch_id.notification_type(), launch_id.origin_url(),
......
...@@ -249,12 +249,12 @@ IN_PROC_BROWSER_TEST_F(NotificationPlatformBridgeWinUITest, HandleEvent) { ...@@ -249,12 +249,12 @@ IN_PROC_BROWSER_TEST_F(NotificationPlatformBridgeWinUITest, HandleEvent) {
// Simulate clicks on the toast. // Simulate clicks on the toast.
NotificationPlatformBridgeWin* bridge = GetBridge(); NotificationPlatformBridgeWin* bridge = GetBridge();
ASSERT_TRUE(bridge); ASSERT_TRUE(bridge);
bridge->ForwardHandleEventForTesting(NotificationCommon::CLICK, &toast, &args, bridge->ForwardHandleEventForTesting(NotificationCommon::OPERATION_CLICK,
base::nullopt); &toast, &args, base::nullopt);
run_loop.Run(); run_loop.Run();
// Validate the click values. // Validate the click values.
EXPECT_EQ(NotificationCommon::CLICK, last_operation_); EXPECT_EQ(NotificationCommon::OPERATION_CLICK, last_operation_);
EXPECT_EQ(NotificationHandler::Type::WEB_PERSISTENT, last_notification_type_); EXPECT_EQ(NotificationHandler::Type::WEB_PERSISTENT, last_notification_type_);
EXPECT_EQ(GURL("https://example.com/"), last_origin_); EXPECT_EQ(GURL("https://example.com/"), last_origin_);
EXPECT_EQ("notification_id", last_notification_id_); EXPECT_EQ("notification_id", last_notification_id_);
...@@ -281,7 +281,7 @@ IN_PROC_BROWSER_TEST_F(NotificationPlatformBridgeWinUITest, HandleActivation) { ...@@ -281,7 +281,7 @@ IN_PROC_BROWSER_TEST_F(NotificationPlatformBridgeWinUITest, HandleActivation) {
run_loop.Run(); run_loop.Run();
// Validate the values. // Validate the values.
EXPECT_EQ(NotificationCommon::CLICK, last_operation_); EXPECT_EQ(NotificationCommon::OPERATION_CLICK, last_operation_);
EXPECT_EQ(NotificationHandler::Type::WEB_PERSISTENT, last_notification_type_); EXPECT_EQ(NotificationHandler::Type::WEB_PERSISTENT, last_notification_type_);
EXPECT_EQ(GURL("https://example.com/"), last_origin_); EXPECT_EQ(GURL("https://example.com/"), last_origin_);
EXPECT_EQ("notification_id", last_notification_id_); EXPECT_EQ("notification_id", last_notification_id_);
...@@ -320,12 +320,12 @@ IN_PROC_BROWSER_TEST_F(NotificationPlatformBridgeWinUITest, HandleSettings) { ...@@ -320,12 +320,12 @@ IN_PROC_BROWSER_TEST_F(NotificationPlatformBridgeWinUITest, HandleSettings) {
// Simulate clicks on the toast. // Simulate clicks on the toast.
NotificationPlatformBridgeWin* bridge = GetBridge(); NotificationPlatformBridgeWin* bridge = GetBridge();
ASSERT_TRUE(bridge); ASSERT_TRUE(bridge);
bridge->ForwardHandleEventForTesting(NotificationCommon::SETTINGS, &toast, bridge->ForwardHandleEventForTesting(NotificationCommon::OPERATION_SETTINGS,
&args, base::nullopt); &toast, &args, base::nullopt);
run_loop.Run(); run_loop.Run();
// Validate the click values. // Validate the click values.
EXPECT_EQ(NotificationCommon::SETTINGS, last_operation_); EXPECT_EQ(NotificationCommon::OPERATION_SETTINGS, last_operation_);
EXPECT_EQ(NotificationHandler::Type::WEB_PERSISTENT, last_notification_type_); EXPECT_EQ(NotificationHandler::Type::WEB_PERSISTENT, last_notification_type_);
EXPECT_EQ(GURL("https://example.com/"), last_origin_); EXPECT_EQ(GURL("https://example.com/"), last_origin_);
EXPECT_EQ("notification_id", last_notification_id_); EXPECT_EQ("notification_id", last_notification_id_);
...@@ -476,7 +476,7 @@ IN_PROC_BROWSER_TEST_F(NotificationPlatformBridgeWinUITest, CmdLineClick) { ...@@ -476,7 +476,7 @@ IN_PROC_BROWSER_TEST_F(NotificationPlatformBridgeWinUITest, CmdLineClick) {
ASSERT_NO_FATAL_FAILURE(ProcessLaunchIdViaCmdLine(kLaunchId, /*reply=*/"")); ASSERT_NO_FATAL_FAILURE(ProcessLaunchIdViaCmdLine(kLaunchId, /*reply=*/""));
// Validate the click values. // Validate the click values.
EXPECT_EQ(NotificationCommon::CLICK, last_operation_); EXPECT_EQ(NotificationCommon::OPERATION_CLICK, last_operation_);
EXPECT_EQ(NotificationHandler::Type::WEB_PERSISTENT, last_notification_type_); EXPECT_EQ(NotificationHandler::Type::WEB_PERSISTENT, last_notification_type_);
EXPECT_EQ(GURL("https://example.com/"), last_origin_); EXPECT_EQ(GURL("https://example.com/"), last_origin_);
EXPECT_EQ("notification_id", last_notification_id_); EXPECT_EQ("notification_id", last_notification_id_);
...@@ -494,7 +494,7 @@ IN_PROC_BROWSER_TEST_F(NotificationPlatformBridgeWinUITest, ...@@ -494,7 +494,7 @@ IN_PROC_BROWSER_TEST_F(NotificationPlatformBridgeWinUITest,
ProcessLaunchIdViaCmdLine(kLaunchIdButtonClick, "Inline reply")); ProcessLaunchIdViaCmdLine(kLaunchIdButtonClick, "Inline reply"));
// Validate the click values. // Validate the click values.
EXPECT_EQ(NotificationCommon::CLICK, last_operation_); EXPECT_EQ(NotificationCommon::OPERATION_CLICK, last_operation_);
EXPECT_EQ(NotificationHandler::Type::WEB_PERSISTENT, last_notification_type_); EXPECT_EQ(NotificationHandler::Type::WEB_PERSISTENT, last_notification_type_);
EXPECT_EQ(GURL("https://example.com/"), last_origin_); EXPECT_EQ(GURL("https://example.com/"), last_origin_);
EXPECT_EQ("notification_id", last_notification_id_); EXPECT_EQ("notification_id", last_notification_id_);
...@@ -511,7 +511,7 @@ IN_PROC_BROWSER_TEST_F(NotificationPlatformBridgeWinUITest, CmdLineButton) { ...@@ -511,7 +511,7 @@ IN_PROC_BROWSER_TEST_F(NotificationPlatformBridgeWinUITest, CmdLineButton) {
ProcessLaunchIdViaCmdLine(kLaunchIdButtonClick, /*reply=*/"")); ProcessLaunchIdViaCmdLine(kLaunchIdButtonClick, /*reply=*/""));
// Validate the click values. // Validate the click values.
EXPECT_EQ(NotificationCommon::CLICK, last_operation_); EXPECT_EQ(NotificationCommon::OPERATION_CLICK, last_operation_);
EXPECT_EQ(NotificationHandler::Type::WEB_PERSISTENT, last_notification_type_); EXPECT_EQ(NotificationHandler::Type::WEB_PERSISTENT, last_notification_type_);
EXPECT_EQ(GURL("https://example.com/"), last_origin_); EXPECT_EQ(GURL("https://example.com/"), last_origin_);
EXPECT_EQ("notification_id", last_notification_id_); EXPECT_EQ("notification_id", last_notification_id_);
...@@ -528,7 +528,7 @@ IN_PROC_BROWSER_TEST_F(NotificationPlatformBridgeWinUITest, CmdLineSettings) { ...@@ -528,7 +528,7 @@ IN_PROC_BROWSER_TEST_F(NotificationPlatformBridgeWinUITest, CmdLineSettings) {
ProcessLaunchIdViaCmdLine(kLaunchIdSettings, /*reply=*/"")); ProcessLaunchIdViaCmdLine(kLaunchIdSettings, /*reply=*/""));
// Validate the click values. // Validate the click values.
EXPECT_EQ(NotificationCommon::SETTINGS, last_operation_); EXPECT_EQ(NotificationCommon::OPERATION_SETTINGS, last_operation_);
EXPECT_EQ(NotificationHandler::Type::WEB_PERSISTENT, last_notification_type_); EXPECT_EQ(NotificationHandler::Type::WEB_PERSISTENT, last_notification_type_);
EXPECT_EQ(GURL("https://example.com/"), last_origin_); EXPECT_EQ(GURL("https://example.com/"), last_origin_);
EXPECT_EQ("notification_id", last_notification_id_); EXPECT_EQ("notification_id", last_notification_id_);
......
...@@ -16,11 +16,12 @@ ...@@ -16,11 +16,12 @@
static_assert(static_cast<int>(a) == static_cast<int>(b), \ static_assert(static_cast<int>(a) == static_cast<int>(b), \
"mismatching enums: " #a) "mismatching enums: " #a)
STATIC_ASSERT_ENUM(NOTIFICATION_CLICK, NotificationCommon::CLICK); STATIC_ASSERT_ENUM(NOTIFICATION_CLICK, NotificationCommon::OPERATION_CLICK);
STATIC_ASSERT_ENUM(NOTIFICATION_CLOSE, NotificationCommon::CLOSE); STATIC_ASSERT_ENUM(NOTIFICATION_CLOSE, NotificationCommon::OPERATION_CLOSE);
STATIC_ASSERT_ENUM(NOTIFICATION_DISABLE_PERMISSION, STATIC_ASSERT_ENUM(NOTIFICATION_DISABLE_PERMISSION,
NotificationCommon::DISABLE_PERMISSION); NotificationCommon::OPERATION_DISABLE_PERMISSION);
STATIC_ASSERT_ENUM(NOTIFICATION_SETTINGS, NotificationCommon::SETTINGS); STATIC_ASSERT_ENUM(NOTIFICATION_SETTINGS,
NotificationCommon::OPERATION_SETTINGS);
STATIC_ASSERT_ENUM(NOTIFICATION_OPERATION_MAX, STATIC_ASSERT_ENUM(NOTIFICATION_OPERATION_MAX,
NotificationCommon::OPERATION_MAX); NotificationCommon::OPERATION_MAX);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment