blob: fdd274f8fcee4a24eaaba580f97da98edcbd0f15 (
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
36
|
<!DOCTYPE html>
<html>
<body>
<script src="../resources/testharness.js"></script>
<script src="../resources/testharnessreport.js"></script>
<script>
test(function() {
assert_true('presentation' in navigator);
assert_true('defaultRequest' in navigator.presentation);
assert_true('PresentationRequest' in window);
}, "Test that the Presentation API is present.")
test(function() {
assert_equals(typeof(navigator.presentation), "object");
assert_equals(typeof(navigator.presentation.defaultRequest), "object");
}, "Test the Presentation API property types.");
test(function() {
assert_false(navigator.presentation instanceof EventTarget);
}, "Test that navigator.presentation is not an EventTarget.");
test(function() {
var request = new PresentationRequest('foo.html');
assert_equals(typeof(request.start), "function");
assert_equals(typeof(request.reconnect), "function");
assert_equals(typeof(request.getAvailability), "function");
assert_equals(typeof(request.onconnectionavailable), "object");
assert_true(request instanceof EventTarget);
}, "Test PresentationRequest API types.");
</script>
</body>
</html>
|