зеркало из https://github.com/mozilla/gecko-dev.git
36 строки
1.3 KiB
HTML
36 строки
1.3 KiB
HTML
<!DOCTYPE HTML>
|
|
<html>
|
|
<!-- Any copyright is dedicated to the Public Domain.
|
|
- http://creativecommons.org/publicdomain/zero/1.0/ -->
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<title>Test for PresentationAvailability</title>
|
|
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
|
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
|
</head>
|
|
<body>
|
|
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1228508">Test PresentationAvailability</a>
|
|
<script type="application/javascript">
|
|
// This test loads in an iframe, to ensure that the navigator instance is
|
|
// loaded with the correct value of the preference.
|
|
SimpleTest.waitForExplicitFinish();
|
|
SimpleTest.requestFlakyTimeout('Test for guarantee not firing async event');
|
|
SpecialPowers.pushPermissions([
|
|
{type: "presentation-device-manage", allow: false, context: document},
|
|
], function() {
|
|
SpecialPowers.pushPrefEnv({
|
|
"set": [["dom.presentation.enabled", true],
|
|
["dom.presentation.controller.enabled", true],
|
|
["dom.presentation.session_transport.data_channel.enable", false]]},
|
|
() => {
|
|
let iframe = document.createElement("iframe");
|
|
iframe.src = "test_presentation_availability_iframe.html";
|
|
document.body.appendChild(iframe);
|
|
}
|
|
);
|
|
});
|
|
|
|
</script>
|
|
</body>
|
|
</html>
|