Commit 8851dc48 authored by Noel Gordon's avatar Noel Gordon Committed by Commit Bot

Minor clickNotificationButton command code re-org

Minor clickNotificationButton re-org while I was running my ruler over
this code. No change in behavior, no new tests.

Tbr: slangley
Bug: 833834
Change-Id: Ic23e13e89ab0d3a30d17d456c6c12c781fbc02f4
Reviewed-on: https://chromium-review.googlesource.com/1041368
Commit-Queue: Noel Gordon <noel@chromium.org>
Reviewed-by: default avatarStuart Langley <slangley@chromium.org>
Reviewed-by: default avatarNoel Gordon <noel@chromium.org>
Cr-Commit-Position: refs/heads/master@{#555893}
parent 6d4ada06
......@@ -754,17 +754,16 @@ void FileManagerBrowserTestBase::OnCommand(const std::string& name,
if (name == "clickNotificationButton") {
std::string extension_id;
std::string notification_id;
int index;
ASSERT_TRUE(value.GetString("extensionId", &extension_id));
ASSERT_TRUE(value.GetString("notificationId", &notification_id));
ASSERT_TRUE(value.GetInteger("index", &index));
const std::string delegate_id = extension_id + "-" + notification_id;
const auto delegate_id = extension_id + "-" + notification_id;
base::Optional<message_center::Notification> notification =
display_service_->GetNotification(delegate_id);
EXPECT_TRUE(notification);
int index;
ASSERT_TRUE(value.GetInteger("index", &index));
display_service_->SimulateClick(NotificationHandler::Type::EXTENSION,
delegate_id, index, base::nullopt);
return;
......
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