test_wrong_provider_in_manifest.html (1276B)
1 <!DOCTYPE HTML> 2 <html> 3 <head> 4 <meta charset="utf-8"> 5 <title>Manifest Disagreement</title> 6 <script src="/tests/SimpleTest/SimpleTest.js"></script> 7 <script src="head.js"></script> 8 <link rel="stylesheet" href="/tests/SimpleTest/test.css"/> 9 <script> 10 SimpleTest.waitForExplicitFinish(); 11 setupTest("wrong_provider_in_manifest").then( 12 function () { 13 SpecialPowers.wrap(document).notifyUserGestureActivation(); 14 return navigator.credentials.get({ 15 identity: { 16 mode: "active", 17 providers: [{ 18 configURL: "https://example.net/tests/dom/credentialmanagement/identity/tests/mochitest/server_manifest_wrong_provider_in_manifest.sjs", 19 clientId: "mochitest", 20 nonce: "nonce" 21 }] 22 } 23 }); 24 } 25 ).then(() => { 26 ok(false, "incorrectly got a credential"); 27 }).catch(() => { 28 ok(true, "correctly got an error"); 29 }).finally(() => { 30 SimpleTest.finish(); 31 }) 32 </script> 33 </head> 34 <body> 35 <p id="display"></p> 36 <div id="content" style="display: none">This test is an important privacy check. We make sure the manifest from the argument to credentials.get matches the IDP's root manifest.</div> 37 <pre id="test"></pre> 38 </body> 39 </html>