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

Unified Diff: chrome/browser/chrome_webusb_browser_client_unittest.cc

Issue 1360873003: Fix WebUSB notification on Chrome OS with no windows open. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update expected strings. Created 5 years, 3 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
« no previous file with comments | « chrome/browser/chrome_webusb_browser_client.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chrome_webusb_browser_client_unittest.cc
diff --git a/chrome/browser/chrome_webusb_browser_client_unittest.cc b/chrome/browser/chrome_webusb_browser_client_unittest.cc
index 5386b35948ae20c53c90d885cfc6b3904afa3376..27cbe39b0363f65afdefccd5706edc6238cf7023 100644
--- a/chrome/browser/chrome_webusb_browser_client_unittest.cc
+++ b/chrome/browser/chrome_webusb_browser_client_unittest.cc
@@ -81,11 +81,12 @@ TEST_F(ChromeWebUsbBrowserClientTest, UsbDeviceAddedAndRemoved) {
message_center->FindVisibleNotificationById(guid);
ASSERT_TRUE(notification != nullptr);
- base::string16 expected_title = base::ASCIIToUTF16("Google Product A");
+ base::string16 expected_title =
+ base::ASCIIToUTF16("Google Product A detected");
EXPECT_EQ(expected_title, notification->title());
base::string16 expected_message =
- base::ASCIIToUTF16("Click here to visit this page");
+ base::ASCIIToUTF16("Go to www.google.com/A to connect.");
EXPECT_EQ(expected_message, notification->message());
EXPECT_TRUE(notification->delegate() != nullptr);
@@ -195,26 +196,32 @@ TEST_F(ChromeWebUsbBrowserClientTest, ThreeUsbDevicesAddedAndRemoved) {
message_center::Notification* notification_1 =
message_center->FindVisibleNotificationById(guid_1);
ASSERT_TRUE(notification_1 != nullptr);
- base::string16 expected_title_1 = base::ASCIIToUTF16("Google Product A");
+ base::string16 expected_title_1 =
+ base::ASCIIToUTF16("Google Product A detected");
EXPECT_EQ(expected_title_1, notification_1->title());
+ base::string16 expected_message_1 =
+ base::ASCIIToUTF16("Go to www.google.com/A to connect.");
+ EXPECT_EQ(expected_message_1, notification_1->message());
message_center::Notification* notification_2 =
message_center->FindVisibleNotificationById(guid_2);
ASSERT_TRUE(notification_2 != nullptr);
- base::string16 expected_title_2 = base::ASCIIToUTF16("Google Product B");
+ base::string16 expected_title_2 =
+ base::ASCIIToUTF16("Google Product B detected");
EXPECT_EQ(expected_title_2, notification_2->title());
+ base::string16 expected_message_2 =
+ base::ASCIIToUTF16("Go to www.google.com/B to connect.");
+ EXPECT_EQ(expected_message_2, notification_2->message());
message_center::Notification* notification_3 =
message_center->FindVisibleNotificationById(guid_3);
ASSERT_TRUE(notification_3 != nullptr);
- base::string16 expected_title_3 = base::ASCIIToUTF16("Google Product C");
+ base::string16 expected_title_3 =
+ base::ASCIIToUTF16("Google Product C detected");
EXPECT_EQ(expected_title_3, notification_3->title());
-
- base::string16 expected_message =
- base::ASCIIToUTF16("Click here to visit this page");
- EXPECT_EQ(expected_message, notification_1->message());
- EXPECT_EQ(expected_message, notification_2->message());
- EXPECT_EQ(expected_message, notification_3->message());
+ base::string16 expected_message_3 =
+ base::ASCIIToUTF16("Go to www.google.com/C to connect.");
+ EXPECT_EQ(expected_message_3, notification_3->message());
EXPECT_TRUE(notification_1->delegate() != nullptr);
EXPECT_TRUE(notification_2->delegate() != nullptr);
« no previous file with comments | « chrome/browser/chrome_webusb_browser_client.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698