Index: test/notification.js |
diff --git a/test/notification.js b/test/notification.js |
index 921f2b69d1e00784eb88de6d6132b96424a84eb3..e0961564919c35c22d2bf5affc4810a208ca0d6f 100644 |
--- a/test/notification.js |
+++ b/test/notification.js |
@@ -59,9 +59,13 @@ function showNotifications(url) |
function* pairs(array) |
{ |
for (let element1 of array) |
+ { |
for (let element2 of array) |
+ { |
if (element1 != element2) |
yield [element1, element2]; |
+ } |
+ } |
} |
function registerHandler(notifications, checkCallback) |
@@ -172,7 +176,7 @@ for (let [propName, value, result] of [ |
["platformMaxVersion", "12.0", true], |
["platformMaxVersion", "12", true], |
["platformMaxVersion", "13", true], |
- ["platformMaxVersion", "11", false], |
+ ["platformMaxVersion", "11", false] |
]) |
{ |
exports.testTargetSelection[`${propName}=${value}`] = function(test) |
@@ -211,7 +215,7 @@ for (let [[propName1, value1, result1], [propName2, value2, result2]] of pairs([ |
["platform", "chromium", true], |
["platform", "gecko", false], |
["platformMinVersion", "12", true], |
- ["platformMinVersion", "13", false], |
+ ["platformMinVersion", "13", false] |
])) |
{ |
exports.testMultipleTargets[`${propName1}=${value1},${propName2}=${value2}`] = function(test) |
@@ -231,10 +235,10 @@ for (let [[propName1, value1, result1], [propName2, value2, result2]] of pairs([ |
registerHandler.call(this, [information]); |
this.runScheduledTasks(1).then(() => |
{ |
- let expected = (result1 || result2 ? [information] : []) |
+ let expected = (result1 || result2 ? [information] : []); |
test.deepEqual(showNotifications(), expected, "Selected notification for " + JSON.stringify(information.targets)); |
}).catch(unexpectedError.bind(test)).then(() => test.done()); |
- } |
+ }; |
} |
exports.testParametersSent = function(test) |
@@ -242,11 +246,11 @@ exports.testParametersSent = function(test) |
Prefs.notificationdata = { |
data: { |
version: "3" |
- }, |
+ } |
}; |
let parameters = null; |
- registerHandler.call(this, [], function(metadata) |
+ registerHandler.call(this, [], metadata => |
{ |
parameters = decodeURI(metadata.queryString); |
}); |
@@ -335,7 +339,7 @@ exports.testUsingSeverityInsteadOfType = function(test) |
let responseText = JSON.stringify({ |
notifications: [severityNotification] |
}); |
- Notification._onDownloadSuccess({}, responseText, function() {}, function() {}); |
+ Notification._onDownloadSuccess({}, responseText, () => {}, () => {}); |
}; |
exports.testURLSpecificNotification = function(test) |
@@ -505,7 +509,7 @@ exports.testLanguageOnly = function(test) |
exports.testLanguageAndCountry = function(test) |
{ |
- let notification = {message: {fr: "fr", "fr-CA": "fr-CA"}}; |
+ let notification = {message: {"fr": "fr", "fr-CA": "fr-CA"}}; |
let texts = Notification.getLocalizedTexts(notification, "fr-CA"); |
test.equal(texts.message, "fr-CA"); |
texts = Notification.getLocalizedTexts(notification, "fr"); |