mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-10-10 01:07:31 +09:00
41 lines
782 B
HTML
41 lines
782 B
HTML
<!DOCTYPE HTML>
|
|
<html>
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<title>Test for B2G PresentationReceiver on a non-receiver page at receiver side</title>
|
|
</head>
|
|
<body>
|
|
<div id="content"></div>
|
|
<script type="application/javascript;version=1.7">
|
|
|
|
"use strict";
|
|
|
|
function is(a, b, msg) {
|
|
alert((a === b ? 'OK ' : 'KO ') + msg);
|
|
}
|
|
|
|
function ok(a, msg) {
|
|
alert((a ? 'OK ' : 'KO ') + msg);
|
|
}
|
|
|
|
function info(msg) {
|
|
alert('INFO ' + msg);
|
|
}
|
|
|
|
function finish() {
|
|
alert('DONE');
|
|
}
|
|
|
|
function testConnectionAvailable() {
|
|
return new Promise(function(aResolve, aReject) {
|
|
is(navigator.presentation.receiver, null, "navigator.presentation.receiver shouldn't be available in non-receiving pages.");
|
|
aResolve();
|
|
});
|
|
}
|
|
|
|
testConnectionAvailable().
|
|
then(finish);
|
|
|
|
</script>
|
|
</body>
|
|
</html>
|