Index: qunit/tests/prefs.js |
diff --git a/qunit/tests/prefs.js b/qunit/tests/prefs.js |
index f620ca9a555056d0a53856fb805a0cc64120011a..5430c8b2eb7ab123a1d9b84e41224c1bc8ac5629 100644 |
--- a/qunit/tests/prefs.js |
+++ b/qunit/tests/prefs.js |
@@ -1,13 +1,14 @@ |
-(function() |
+"use strict"; |
+ |
{ |
module("Preferences", |
{ |
- setup: function() |
+ setup() |
{ |
preparePrefs.call(this); |
}, |
- teardown: function() |
+ teardown() |
{ |
restorePrefs.call(this); |
} |
@@ -17,7 +18,7 @@ |
{ |
let done = assert.async(); |
let key = "pref:" + name; |
- chrome.storage.local.get(key, function(items) |
+ chrome.storage.local.get(key, items => |
{ |
equal(key in items, expectedValue, description); |
done(); |
@@ -28,14 +29,14 @@ |
{ |
let done = assert.async(); |
let key = "pref:" + name; |
- chrome.storage.local.get(key, function(items) |
+ chrome.storage.local.get(key, items => |
{ |
deepEqual(items[key], expectedValue, description); |
done(); |
}); |
} |
- test("Numerical pref", function(assert) |
+ test("Numerical pref", assert => |
{ |
Prefs.patternsbackups = 5; |
equal(Prefs.patternsbackups, 5, "Prefs object returns the correct value after setting pref to default value"); |
@@ -46,7 +47,7 @@ |
checkPref("patternsbackups", 12, "Value has been written", assert); |
}); |
- test("Boolean pref", function(assert) |
+ test("Boolean pref", assert => |
{ |
Prefs.enabled = true; |
equal(Prefs.enabled, true, "Prefs object returns the correct value after setting pref to default value"); |
@@ -57,7 +58,7 @@ |
checkPref("enabled", false, "Value has been written", assert); |
}); |
- test("String pref", function(assert) |
+ test("String pref", assert => |
{ |
let defaultValue = "https://notification.adblockplus.org/notification.json"; |
Prefs.notificationurl = defaultValue; |
@@ -71,7 +72,7 @@ |
checkPref("notificationurl", newValue, "Value has been written", assert); |
}); |
- test("Object pref (complete replacement)", function(assert) |
+ test("Object pref (complete replacement)", assert => |
{ |
Prefs.notificationdata = {}; |
deepEqual(Prefs.notificationdata, {}, "Prefs object returns the correct value after setting pref to default value"); |
@@ -83,7 +84,7 @@ |
checkPref("notificationdata", newValue, "Value has been written", assert); |
}); |
- test("Property-wise modification", function(assert) |
+ test("Property-wise modification", assert => |
{ |
Prefs.notificationdata = {}; |
@@ -99,4 +100,4 @@ |
Prefs.notificationdata = JSON.parse(JSON.stringify(Prefs.notificationdata)); |
deepEqual(Prefs.notificationdata, {}, "Prefs object returns the correct value after setting pref to default value"); |
}); |
-})(); |
+} |