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

Unified Diff: trunk/src/chrome/test/data/extensions/api_test/notifications/api/by_user/background.js

Issue 296113009: Revert 272211 "Allow high-res bitmaps to be passed in from notif..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 6 years, 7 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
Index: trunk/src/chrome/test/data/extensions/api_test/notifications/api/by_user/background.js
===================================================================
--- trunk/src/chrome/test/data/extensions/api_test/notifications/api/by_user/background.js (revision 272269)
+++ trunk/src/chrome/test/data/extensions/api_test/notifications/api/by_user/background.js (working copy)
@@ -25,25 +25,10 @@
function createCallback(id) { }
-function notifyPass() { chrome.test.notifyPass(); }
-
var onClosedHooks = {
- FOO: notifyPass,
- BAR: notifyPass,
BIFF: function() {
- notifications.create("BLAT", notificationData, function () {
- if (chrome.runtime.lastError) {
- chrome.test.notifyFail(lastError.message);
- return;
- }
- notifications.create("BLOT", notificationData, function () {
- if (chrome.runtime.lastError) {
- chrome.test.notifyFail(lastError.message);
- return;
- }
- chrome.test.notifyPass("Created the new notifications.");
- });
- });
+ notifications.create("BLAT", notificationData, createCallback);
+ notifications.create("BLOT", notificationData, createCallback);
},
};
@@ -53,25 +38,19 @@
" closed with bad by_user param ( "+ by_user +" )");
return;
}
+ chrome.test.notifyPass();
delete results[id];
if (typeof onClosedHooks[id] === "function")
onClosedHooks[id]();
- if (Object.keys(results).length === 0) {
- chrome.test.notifyPass("Done!");
+ if (Object.keys(results).length === 0)
theOnlyTestDone();
- }
}
notifications.onClosed.addListener(onClosedListener);
function theOnlyTest() {
- // This test coordinates with the browser test. First, 4 notifications are
- // created. Then 2 are manually cancelled in C++. Then clearAll is called
- // with false |by_user|. Then once the BIFF notification is cleared, we
- // create two more notifications in JS, and C++ calls the clearAll with true
- // |by_user|.
theOnlyTestDone = chrome.test.callbackAdded();
notifications.create("FOO", notificationData, createCallback);

Powered by Google App Engine
This is Rietveld 408576698