mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 811012 - Allow forceAuthentication parameter to request for whitelisted Marketplace. r=benadida
This commit is contained in:
parent
05b70aeba2
commit
81fbf53a81
@ -205,7 +205,7 @@ function test_options_pass_through() {
|
||||
// objects and their parameters as they are passed back and forth.
|
||||
let randomMixedParams = {
|
||||
loggedInUser: "juanita@mozilla.com",
|
||||
pie: 42,
|
||||
forceAuthentication: true,
|
||||
someThing: {
|
||||
name: "Pertelote",
|
||||
legs: 4,
|
||||
|
@ -61,6 +61,25 @@ function test_request() {
|
||||
MinimalIDService.RP.request(mockedDoc.id, {});
|
||||
}
|
||||
|
||||
/*
|
||||
* Test that the forceAuthentication flag can be sent
|
||||
*/
|
||||
function test_request_forceAuthentication() {
|
||||
do_test_pending();
|
||||
|
||||
let mockedDoc = mock_doc(null, TEST_URL);
|
||||
makeObserver("identity-controller-request", function (aSubject, aTopic, aData) {
|
||||
do_check_eq(aSubject.wrappedJSObject.id, mockedDoc.id);
|
||||
do_check_eq(aSubject.wrappedJSObject.origin, TEST_URL);
|
||||
do_check_eq(aSubject.wrappedJSObject.forceAuthentication, true);
|
||||
do_test_finished();
|
||||
run_next_test();
|
||||
});
|
||||
|
||||
MinimalIDService.RP.watch(mockedDoc);
|
||||
MinimalIDService.RP.request(mockedDoc.id, {forceAuthentication: true});
|
||||
}
|
||||
|
||||
/*
|
||||
* Test that the "identity-controller-logout" signal is emitted correctly
|
||||
*/
|
||||
@ -83,6 +102,7 @@ let TESTS = [
|
||||
test_mock_doc,
|
||||
test_watch,
|
||||
test_request,
|
||||
test_request_forceAuthentication,
|
||||
test_logout
|
||||
];
|
||||
|
||||
|
@ -155,6 +155,27 @@ function test_request() {
|
||||
RelyingParty.request(mockedDoc.id, {});
|
||||
}
|
||||
|
||||
/*
|
||||
* ensure the forceAuthentication param can be passed through
|
||||
*/
|
||||
function test_request_forceAuthentication() {
|
||||
do_test_pending();
|
||||
|
||||
let mockedDoc = mock_doc(null, TEST_URL, function(action, params) {});
|
||||
|
||||
RelyingParty.watch(mockedDoc);
|
||||
|
||||
makeObserver("identity-request", function(aSubject, aTopic, aData) {
|
||||
dump("teh obj is " + JSON.stringify(aSubject.wrappedJSObject) + "\n");
|
||||
do_check_eq(aSubject.wrappedJSObject.rpId, mockedDoc.id);
|
||||
do_check_eq(aSubject.wrappedJSObject.forceAuthentication, true);
|
||||
do_test_finished();
|
||||
run_next_test();
|
||||
});
|
||||
|
||||
RelyingParty.request(mockedDoc.id, {forceAuthentication: true});
|
||||
}
|
||||
|
||||
function test_logout() {
|
||||
do_test_pending();
|
||||
|
||||
@ -204,6 +225,7 @@ let TESTS = [
|
||||
test_watch_notloggedin_ready,
|
||||
test_watch_notloggedin_logout,
|
||||
test_request,
|
||||
test_request_forceAuthentication,
|
||||
test_logout
|
||||
];
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user