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

Unified Diff: trunk/src/chrome/test/data/extensions/api_test/notification_provider/events/test.js

Issue 469313002: Revert 289532 "Route newly created notifications to notification..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 6 years, 4 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 | « trunk/src/chrome/test/data/extensions/api_test/notification_provider/events/manifest.json ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: trunk/src/chrome/test/data/extensions/api_test/notification_provider/events/test.js
===================================================================
--- trunk/src/chrome/test/data/extensions/api_test/notification_provider/events/test.js (revision 289543)
+++ trunk/src/chrome/test/data/extensions/api_test/notification_provider/events/test.js (working copy)
@@ -1,30 +1,24 @@
// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+var testEvents = function() {
-var idString = "id1";
-
-function testOnCreated() {
-
- var content = {
- type: "basic",
- iconUrl: "icon.png",
- title: "Title",
- message: "This is the message."
- };
-
- var createCallback = function (id) {}
- chrome.notifications.create(idString, content, createCallback);
-
chrome.notificationProvider.onCreated.addListener(function(senderId,
notificationId,
options) {
- var str = notificationId.split("-");
- chrome.test.assertEq(idString, str[1]);
- chrome.test.assertEq(options.title, content.title);
- chrome.test.assertEq(options.message, content.message);
chrome.test.succeed();
});
+
+ chrome.notificationProvider.onUpdated.addListener(function(senderId,
+ notificationId,
+ options) {
+ chrome.test.succeed();
+ });
+
+ chrome.notificationProvider.onCleared.addListener(function(senderId,
+ notificationId) {
+ chrome.test.succeed();
+ });
};
-chrome.test.runTests([ testOnCreated ]);
+chrome.test.runTests([ testEvents ]);
« no previous file with comments | « trunk/src/chrome/test/data/extensions/api_test/notification_provider/events/manifest.json ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698