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

Side by Side Diff: chrome/test/data/extensions/api_test/notifications/api/partial_update/background.js

Issue 1188213002: Making icon url for buttons in notification optional. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added Test case. Created 5 years, 6 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 unified diff | Download patch
« no previous file with comments | « chrome/browser/extensions/api/notifications/notifications_apitest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 const notifications = chrome.notifications; 5 const notifications = chrome.notifications;
6 6
7 function arrayEquals(a, b) { 7 function arrayEquals(a, b) {
8 if (a === b) return true; 8 if (a === b) return true;
9 if (a == null || b == null) return false; 9 if (a == null || b == null) return false;
10 if (a.length !== b.length) return false; 10 if (a.length !== b.length) return false;
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 var basicNotificationOptions = { 117 var basicNotificationOptions = {
118 type: "basic", 118 type: "basic",
119 title: "Basic title", 119 title: "Basic title",
120 message: "Basic message", 120 message: "Basic message",
121 iconUrl: red_dot, 121 iconUrl: red_dot,
122 buttons: [{title: "Button"}] 122 buttons: [{title: "Button"}]
123 }; 123 };
124 124
125 // Create a notification. 125 // Create a notification.
126 create("testId", basicNotificationOptions) 126 create("testId", basicNotificationOptions)
127 // Then update a few items 127 // Then update a few items
128 .then(function () { 128 .then(function() {
129 return update("testId", { 129 return update("testId", {
130 title: "Changed!", 130 title: "Changed!",
131 message: "Too late! The show ended yesterday" 131 message: "Too late! The show ended yesterday"
132 }); 132 });
133 }) 133 })
134 // Then update a few more items 134 // Then update a few more items
135 .then(function () { return update("testId", {priority:2, buttons: []}); }) 135 .then(function() {
136 // The test will continue in C++, checking that all the updates "took" 136 return update("testId", {priority: 2, buttons: [{title: "NewButton"}]});
137 .then(chrome.test.succeed, chrome.test.fail); 137 })
138 // The test will continue in C++, checking that all the updates "took"
139 .then(chrome.test.succeed, chrome.test.fail);
138 }; 140 };
139 141
140 142
141 chrome.test.runTests([testPartialUpdate]); 143 chrome.test.runTests([testPartialUpdate]);
OLDNEW
« no previous file with comments | « chrome/browser/extensions/api/notifications/notifications_apitest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698