blob: 3f593f9aa7a489057973211d9b73415142d5fed1 (
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
|
<!DOCTYPE html>
<html>
<body>
<script src="../resources/testharness.js"></script>
<script src="../resources/testharnessreport.js"></script>
<script>
test(function() {
assert_true('receiver' in navigator.presentation);
assert_true('getConnection' in navigator.presentation.receiver);
assert_true('getConnections' in navigator.presentation.receiver);
assert_true('onconnectionavailable' in navigator.presentation.receiver);
assert_true('PresentationReceiver' in window);
}, "Test that the Presentation Receiver API is present.")
test(function() {
assert_equals(typeof(navigator.presentation.receiver), "object");
assert_equals(typeof(navigator.presentation.receiver.getConnection), "function");
assert_equals(typeof(navigator.presentation.receiver.getConnections), "function");
assert_equals(typeof(navigator.presentation.receiver.onconnectionavailable), "object");
}, "Test the Presentation Receiver API property types.");
test(function() {
assert_true(navigator.presentation.receiver instanceof EventTarget);
}, "Test that navigator.presentation.receiver is an EventTarget.");
</script>
</body>
</html>
|