mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1036198 - rejection not defined in _handleGetAssertionError. r=spenrose
This commit is contained in:
parent
86c8e0e5cf
commit
013dc80b0b
@ -11,8 +11,11 @@ Cu.import("resource://services-common/utils.js");
|
||||
Cu.import("resource://testing-common/httpd.js");
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetter(this, "FxAccountsMgmtService",
|
||||
"resource://gre/modules/FxAccountsMgmtService.jsm",
|
||||
"FxAccountsMgmtService");
|
||||
"resource://gre/modules/FxAccountsMgmtService.jsm",
|
||||
"FxAccountsMgmtService");
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetter(this, "FxAccountsManager",
|
||||
"resource://gre/modules/FxAccountsManager.jsm");
|
||||
|
||||
// At end of test, restore original state
|
||||
const ORIGINAL_AUTH_URI = Services.prefs.getCharPref("identity.fxaccounts.auth.uri");
|
||||
@ -158,6 +161,22 @@ add_test(function test_invalidEmailCase_signIn() {
|
||||
});
|
||||
});
|
||||
|
||||
add_test(function testHandleGetAssertionError_defaultCase() {
|
||||
do_test_pending();
|
||||
|
||||
FxAccountsManager.getAssertion(null).then(
|
||||
success => {
|
||||
// getAssertion should throw with invalid audience
|
||||
ok(false);
|
||||
},
|
||||
reason => {
|
||||
equal("INVALID_AUDIENCE", reason.error);
|
||||
do_test_finished();
|
||||
run_next_test();
|
||||
}
|
||||
)
|
||||
});
|
||||
|
||||
// End of tests
|
||||
// Utility functions follow
|
||||
|
||||
|
@ -204,7 +204,7 @@ this.FxAccountsManager = {
|
||||
}
|
||||
);
|
||||
}
|
||||
return rejection;
|
||||
return Promise.reject(reason);
|
||||
},
|
||||
|
||||
_getAssertion: function(aAudience) {
|
||||
|
Loading…
Reference in New Issue
Block a user