| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <html> | 2 <html> |
| 3 <body> | 3 <body> |
| 4 <script src="../resources/testharness.js"></script> | 4 <script src="../resources/testharness.js"></script> |
| 5 <script src="../resources/testharnessreport.js"></script> | 5 <script src="../resources/testharnessreport.js"></script> |
| 6 <script> | 6 <script> |
| 7 | 7 |
| 8 test(function() { | 8 test(function() { |
| 9 assert_true('receiver' in navigator.presentation); | 9 assert_true('receiver' in navigator.presentation); |
| 10 assert_true('getConnection' in navigator.presentation.receiver); | 10 assert_true('connectionList' in navigator.presentation.receiver); |
| 11 assert_true('getConnections' in navigator.presentation.receiver); | |
| 12 assert_true('onconnectionavailable' in navigator.presentation.receiver); | |
| 13 | |
| 14 assert_true('PresentationReceiver' in window); | |
| 15 }, "Test that the Presentation Receiver API is present.") | 11 }, "Test that the Presentation Receiver API is present.") |
| 16 | 12 |
| 17 test(function() { | 13 test(function() { |
| 18 assert_equals(typeof(navigator.presentation.receiver), "object"); | 14 assert_equals(typeof(navigator.presentation.receiver), "object"); |
| 19 assert_equals(typeof(navigator.presentation.receiver.getConnection), "function
"); | 15 assert_equals(typeof(navigator.presentation.receiver.connectionList), "object"
); |
| 20 assert_equals(typeof(navigator.presentation.receiver.getConnections), "functio
n"); | |
| 21 assert_equals(typeof(navigator.presentation.receiver.onconnectionavailable), "
object"); | |
| 22 }, "Test the Presentation Receiver API property types."); | 16 }, "Test the Presentation Receiver API property types."); |
| 23 | 17 |
| 24 test(function() { | |
| 25 assert_true(navigator.presentation.receiver instanceof EventTarget); | |
| 26 }, "Test that navigator.presentation.receiver is an EventTarget."); | |
| 27 | |
| 28 </script> | 18 </script> |
| 29 </body> | 19 </body> |
| 30 </html> | 20 </html> |
| OLD | NEW |