зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1317400 - Part 4: Fix other tests. r=till
This commit is contained in:
Родитель
61b1349ff4
Коммит
183c8b3779
|
@ -145,7 +145,7 @@ add_task(function* testCaptureVisibleTabPermissions() {
|
|||
"permissions": ["tabs"],
|
||||
},
|
||||
|
||||
background() {
|
||||
background: function() {
|
||||
browser.test.assertEq(undefined, browser.tabs.captureVisibleTab,
|
||||
'Extension without "<all_urls>" permission should not have access to captureVisibleTab');
|
||||
browser.test.notifyPass("captureVisibleTabPermissions");
|
||||
|
|
|
@ -22,21 +22,21 @@
|
|||
storage.b = 0;
|
||||
assert_equals(storage.b, "0");
|
||||
storage.c = function(){};
|
||||
assert_equals(storage.c, "function (){}");
|
||||
assert_equals(storage.c, "function(){}");
|
||||
|
||||
storage.setItem('d', null);
|
||||
assert_equals(storage.d, "null");
|
||||
storage.setItem('e', 0);
|
||||
assert_equals(storage.e, "0");
|
||||
storage.setItem('f', function(){});
|
||||
assert_equals(storage.f, "function (){}");
|
||||
assert_equals(storage.f, "function(){}");
|
||||
|
||||
storage['g'] = null;
|
||||
assert_equals(storage.g, "null");
|
||||
storage['h'] = 0;
|
||||
assert_equals(storage.h, "0");
|
||||
storage['i'] = function(){};
|
||||
assert_equals(storage.f, "function (){}");
|
||||
assert_equals(storage.f, "function(){}");
|
||||
|
||||
}, name + " only stores strings");
|
||||
});
|
||||
|
|
|
@ -381,12 +381,12 @@ add_task(function* log_message_with_params() {
|
|||
ob = function() {};
|
||||
ob.toJSON = function() {throw "oh noes JSON"};
|
||||
do_check_eq(formatMessage("Fail is ${sub}", {sub: ob}),
|
||||
"Fail is (function () {})");
|
||||
"Fail is (function() {})");
|
||||
|
||||
// Fall back to .toString if both .toJSON and .toSource fail.
|
||||
ob.toSource = function() {throw "oh noes SOURCE"};
|
||||
do_check_eq(formatMessage("Fail is ${sub}", {sub: ob}),
|
||||
"Fail is function () {}");
|
||||
"Fail is function() {}");
|
||||
|
||||
// Fall back to '[object]' if .toJSON, .toSource and .toString fail.
|
||||
ob.toString = function() {throw "oh noes STRING"};
|
||||
|
@ -451,7 +451,7 @@ add_task(function* log_message_with_params() {
|
|||
/* eslint-disable object-shorthand */
|
||||
let vOf = {a: 1, valueOf: function() {throw "oh noes valueOf"}};
|
||||
do_check_eq(formatMessage("Broken valueOf ${}", vOf),
|
||||
'Broken valueOf ({a:1, valueOf:(function () {throw "oh noes valueOf"})})');
|
||||
'Broken valueOf ({a:1, valueOf:(function() {throw "oh noes valueOf"})})');
|
||||
/* eslint-enable object-shorthand */
|
||||
|
||||
// Test edge cases of bad data to formatter:
|
||||
|
|
Загрузка…
Ссылка в новой задаче