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

Unified Diff: chrome/browser/extensions/api/notification/notification_apitest.cc

Issue 11410008: Created initial multi-item notification view (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 1 month 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 | « no previous file | ui/message_center/message_center.gyp » ('j') | ui/message_center/notification_list.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/api/notification/notification_apitest.cc
diff --git a/chrome/browser/extensions/api/notification/notification_apitest.cc b/chrome/browser/extensions/api/notification/notification_apitest.cc
index b3ff3a2c44a5d7e0ecd8174c573d71483a237c57..e919b40c3455156481ae59f87ca90c74dc02554c 100644
--- a/chrome/browser/extensions/api/notification/notification_apitest.cc
+++ b/chrome/browser/extensions/api/notification/notification_apitest.cc
@@ -84,3 +84,30 @@ IN_PROC_BROWSER_TEST_F(NotificationApiTest, TestBaseFormatNotification) {
// TODO(miket): confirm that the show succeeded.
}
+
+IN_PROC_BROWSER_TEST_F(NotificationApiTest, TestMultipleItemNotification) {
+ scoped_refptr<extensions::NotificationShowFunction>
+ notification_show_function(new extensions::NotificationShowFunction());
+ scoped_refptr<Extension> empty_extension(utils::CreateEmptyExtension());
+
+ notification_show_function->set_extension(empty_extension.get());
+ notification_show_function->set_has_callback(true);
+
+ scoped_ptr<base::Value> result(utils::RunFunctionAndReturnSingleResult(
+ notification_show_function,
+ "[{"
+ "\"notificationType\": \"multiple\","
+ "\"iconUrl\": \"https://code.google.com/p/chromium/logo\","
+ "\"title\": \"Multiple Item Notification Title\","
+ "\"message\": \"Multiple item notification message.\","
+ "\"priority\": 1,"
+ "\"timestamp\": \"Fri, 16 Nov 2012 01:17:15 GMT\","
+ "\"replaceId\": \"12345678\""
+ "}]",
+ browser(), utils::NONE));
+ // TODO(dharcourt): [...], items = [{title: foo, message: bar}, ...], [...]
+
+ ASSERT_EQ(base::Value::TYPE_DICTIONARY, result->GetType());
+
+ // TODO(dharcourt): confirm that the show succeeded.
+}
« no previous file with comments | « no previous file | ui/message_center/message_center.gyp » ('j') | ui/message_center/notification_list.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698