Commit 4489ddf5 authored by Xi Cheng's avatar Xi Cheng Committed by Commit Bot

Make launch id valid in NPBW unittest

Bug: 734095
Change-Id: I0ad44050d97f942e5cebf4d9f302ce74f4527b34
Reviewed-on: https://chromium-review.googlesource.com/990574Reviewed-by: default avatarFinnur Thorarinsson <finnur@chromium.org>
Commit-Queue: Xi Cheng <chengx@chromium.org>
Cr-Commit-Position: refs/heads/master@{#547729}
parent 39bd21e4
......@@ -34,7 +34,7 @@ using message_center::Notification;
namespace {
const char kLaunchId[] = "0|Default|0|https://example.com/|notification_id";
const char kLaunchId[] = "0|0|Default|0|https://example.com/|notification_id";
const char kOrigin[] = "https://www.google.com/";
const char kNotificationId[] = "id";
const char kProfileId[] = "Default";
......@@ -60,6 +60,7 @@ class NotificationPlatformBridgeWinTest : public testing::Test {
notification->set_renotify(renotify);
MockNotificationImageRetainer image_retainer;
NotificationLaunchId launch_id(kLaunchId);
DCHECK(launch_id.is_valid());
std::unique_ptr<NotificationTemplateBuilder> builder =
NotificationTemplateBuilder::Build(&image_retainer, launch_id,
kProfileId, *notification);
......@@ -142,7 +143,7 @@ TEST_F(NotificationPlatformBridgeWinTest, Suppress) {
// Register a single notification.
base::string16 tag = base::UintToString16(base::Hash(kNotificationId));
MockIToastNotification item1(
L"<toast launch=\"0|Default|0|https://foo.com/|id\"></toast>", tag);
L"<toast launch=\"0|0|Default|0|https://foo.com/|id\"></toast>", tag);
notifications.push_back(&item1);
// Request this notification with renotify true (should not be suppressed).
......
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