| OLD | NEW |
| 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 red_dot = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUA" + |
| 6 "AAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO" + |
| 7 "9TXL0Y4OHwAAAABJRU5ErkJggg=="; |
| 8 |
| 5 function userActionTest() { | 9 function userActionTest() { |
| 6 chrome.test.sendMessage(""); | 10 chrome.test.sendMessage(""); |
| 7 } | 11 } |
| 8 | 12 |
| 9 chrome.notifications.onClicked.addListener(userActionTest); | 13 chrome.notifications.onClicked.addListener(userActionTest); |
| 10 chrome.notifications.onButtonClicked.addListener(userActionTest); | 14 chrome.notifications.onButtonClicked.addListener(userActionTest); |
| 11 chrome.notifications.onClosed.addListener(userActionTest); | 15 chrome.notifications.onClosed.addListener(userActionTest); |
| 12 | 16 |
| 13 chrome.notifications.create("test", { | 17 chrome.notifications.create("test", { |
| 14 iconUrl: "", | 18 iconUrl: red_dot, |
| 15 title: "hi", | 19 title: "hi", |
| 16 message: "there", | 20 message: "there", |
| 17 type: "basic", | 21 type: "basic", |
| 18 buttons: [{title: "Button"}, {title: "Button"}], | 22 buttons: [{title: "Button"}, {title: "Button"}], |
| 19 }, function () {}); | 23 }, function () {}); |
| OLD | NEW |