test_simple_no_user_activation.html (1221B)
1 <!DOCTYPE HTML> 2 <html> 3 <head> 4 <meta charset="utf-8"> 5 <title>Happypath Test</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("simple").then( 12 function () { 13 return navigator.credentials.get({ 14 identity: { 15 mode: "active", 16 providers: [{ 17 configURL: "https://example.net/tests/dom/credentialmanagement/identity/tests/mochitest/server_manifest.sjs", 18 clientId: "mochitest", 19 nonce: "nonce" 20 }] 21 } 22 }); 23 } 24 ).then(() => { 25 ok(false, "must not get a credential without user activation in active mode"); 26 }).catch(() => { 27 ok(true, "must error without user activation"); 28 }).finally(() => { 29 SimpleTest.finish(); 30 }) 31 </script> 32 </head> 33 <body> 34 <p id="display"></p> 35 <div id="content" style="display: none">This is the main happypath test. We get a credential in a way that should work. This includes simplifying some logic like exactly one account and provider.</div> 36 <pre id="test"></pre> 37 </body> 38 </html>