зеркало из https://github.com/mozilla/gecko-dev.git
68 строки
1.9 KiB
HTML
68 строки
1.9 KiB
HTML
<!DOCTYPE html>
|
|
<meta charset=utf-8>
|
|
<head>
|
|
<title>Test for AppID / FacetID behavior for FIDO Universal Second Factor</title>
|
|
<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
|
<script src="u2futil.js"></script>
|
|
|
|
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
|
|
</head>
|
|
<body>
|
|
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1231681">Mozilla Bug 1231681</a>
|
|
<p id="display"></p>
|
|
|
|
<div id="content" style="display: none"></div>
|
|
|
|
<div id="framediv">
|
|
<iframe id="testing_frame"></iframe>
|
|
</div>
|
|
|
|
<pre id="log"></pre>
|
|
|
|
|
|
<script class="testbody" type="text/javascript">
|
|
SpecialPowers.setBoolPref("security.webauth.u2f", true);
|
|
SpecialPowers.setBoolPref("security.webauth.u2f.softtoken", true);
|
|
|
|
var testList = [
|
|
"https://example.com/tests/dom/u2f/tests/test_frame_register.html",
|
|
"http://mochi.test:8888/tests/dom/u2f/tests/test_frame_appid_facet_insecure.html",
|
|
"https://example.com/tests/dom/u2f/tests/test_frame_appid_facet.html",
|
|
"https://example.com/tests/dom/u2f/tests/test_frame_appid_facet_remoteload.html",
|
|
"https://test1.example.com/tests/dom/u2f/tests/test_frame_appid_facet_subdomain.html"
|
|
];
|
|
|
|
function log(msg) {
|
|
document.getElementById("log").textContent += "\n" + msg;
|
|
}
|
|
|
|
function nextTest() {
|
|
if (testList.length < 1) {
|
|
SimpleTest.finish();
|
|
return;
|
|
}
|
|
|
|
document.getElementById('testing_frame').src = testList.shift();
|
|
}
|
|
|
|
// listen for a messages from the mixed content test harness
|
|
function receiveMessage(event) {
|
|
if ("test" in event.data) {
|
|
var summary = event.data.test + ": " + event.data.msg;
|
|
log(event.data.status + ": " + summary);
|
|
ok(event.data.status, summary);
|
|
} else if ("done" in event.data) {
|
|
nextTest();
|
|
}
|
|
}
|
|
|
|
SimpleTest.waitForExplicitFinish();
|
|
|
|
window.addEventListener("message", receiveMessage, false);
|
|
nextTest();
|
|
|
|
</script>
|
|
|
|
</body>
|
|
</html>
|