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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/extensions/api/notification/notification_api.h" 5 #include "chrome/browser/extensions/api/notification/notification_api.h"
6 #include "chrome/browser/extensions/extension_apitest.h" 6 #include "chrome/browser/extensions/extension_apitest.h"
7 #include "chrome/browser/extensions/extension_function_test_utils.h" 7 #include "chrome/browser/extensions/extension_function_test_utils.h"
8 #include "chrome/common/chrome_switches.h" 8 #include "chrome/common/chrome_switches.h"
9 9
10 using extensions::Extension; 10 using extensions::Extension;
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 "\"expandedMessage\": \"This is a longer expanded message.\"," 77 "\"expandedMessage\": \"This is a longer expanded message.\","
78 "\"imageUrl\": \"http://www.google.com/logos/2012/election12-hp.jpg\"," 78 "\"imageUrl\": \"http://www.google.com/logos/2012/election12-hp.jpg\","
79 "\"replaceId\": \"12345678\"" 79 "\"replaceId\": \"12345678\""
80 "}]", 80 "}]",
81 browser(), utils::NONE)); 81 browser(), utils::NONE));
82 82
83 ASSERT_EQ(base::Value::TYPE_DICTIONARY, result->GetType()); 83 ASSERT_EQ(base::Value::TYPE_DICTIONARY, result->GetType());
84 84
85 // TODO(miket): confirm that the show succeeded. 85 // TODO(miket): confirm that the show succeeded.
86 } 86 }
87
88 IN_PROC_BROWSER_TEST_F(NotificationApiTest, TestMultipleItemNotification) {
89 scoped_refptr<extensions::NotificationShowFunction>
90 notification_show_function(new extensions::NotificationShowFunction());
91 scoped_refptr<Extension> empty_extension(utils::CreateEmptyExtension());
92
93 notification_show_function->set_extension(empty_extension.get());
94 notification_show_function->set_has_callback(true);
95
96 scoped_ptr<base::Value> result(utils::RunFunctionAndReturnSingleResult(
97 notification_show_function,
98 "[{"
99 "\"notificationType\": \"multiple\","
100 "\"iconUrl\": \"https://code.google.com/p/chromium/logo\","
101 "\"title\": \"Multiple Item Notification Title\","
102 "\"message\": \"Multiple item notification message.\","
103 "\"priority\": 1,"
104 "\"timestamp\": \"Fri, 16 Nov 2012 01:17:15 GMT\","
105 "\"replaceId\": \"12345678\""
106 "}]",
107 browser(), utils::NONE));
108 // TODO(dharcourt): [...], items = [{title: foo, message: bar}, ...], [...]
109
110 ASSERT_EQ(base::Value::TYPE_DICTIONARY, result->GetType());
111
112 // TODO(dharcourt): confirm that the show succeeded.
113 }
OLDNEW
« 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