blob: 7d7a348353b3a18323523922f1cd5a43a668a661 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
<!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 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>
|