зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1237357 - Fix missing Cr used by AddonLocalizationConverter in simpleServices. r=kmag
This commit is contained in:
Родитель
64a1cfc0a0
Коммит
7ce1de0dec
|
@ -107,13 +107,19 @@ add_task(function* testInvalidUUID() {
|
|||
let uri = NetUtil.newURI("moz-extension://eb4f3be8-41c9-4970-aa6d-b84d1ecc02b2/file.css");
|
||||
let stream = StringStream("Foo __MSG_xxx__ bar __MSG_yyy__ baz");
|
||||
|
||||
// Assert.throws raise a TypeError exception when the expected param
|
||||
// is an arrow function. (See Bug 1237961 for rationale)
|
||||
let expectInvalidContextException = function(e) {
|
||||
return e.result === Cr.NS_ERROR_INVALID_ARG && /Invalid context/.test(e);
|
||||
};
|
||||
|
||||
Assert.throws(() => {
|
||||
convService.convert(stream, FROM_TYPE, TO_TYPE, uri);
|
||||
});
|
||||
}, expectInvalidContextException);
|
||||
|
||||
Assert.throws(() => {
|
||||
let listener = { QueryInterface: XPCOMUtils.generateQI([Ci.nsIStreamListener]) };
|
||||
|
||||
convService.asyncConvertData(FROM_TYPE, TO_TYPE, listener, uri);
|
||||
});
|
||||
}, expectInvalidContextException);
|
||||
});
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
const Cc = Components.classes;
|
||||
const Cu = Components.utils;
|
||||
const Ci = Components.interfaces;
|
||||
const Cr = Components.results;
|
||||
|
||||
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче