blob: fdd274f8fcee4a24eaaba580f97da98edcbd0f15 [file] [log] [blame]
<!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>