| 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('presentation' in navigator); | 9 assert_true('presentation' in navigator); |
| 10 assert_true('session' in navigator.presentation); | 10 assert_true('session' in navigator.presentation); |
| 11 assert_true('startSession' in navigator.presentation); | 11 assert_true('startSession' in navigator.presentation); |
| 12 assert_true('joinSession' in navigator.presentation); | 12 assert_true('joinSession' in navigator.presentation); |
| 13 assert_true('onavailablechange' in navigator.presentation); | |
| 14 assert_true('ondefaultsessionstart' in navigator.presentation); | 13 assert_true('ondefaultsessionstart' in navigator.presentation); |
| 14 assert_true('getAvailability' in navigator.presentation); |
| 15 }, "Test that the Presentation API is present.") | 15 }, "Test that the Presentation API is present.") |
| 16 | 16 |
| 17 test(function() { | 17 test(function() { |
| 18 assert_equals(typeof(navigator.presentation), "object"); | 18 assert_equals(typeof(navigator.presentation), "object"); |
| 19 assert_equals(typeof(navigator.presentation.session), "object"); | 19 assert_equals(typeof(navigator.presentation.session), "object"); |
| 20 assert_equals(typeof(navigator.presentation.startSession), "function"); | 20 assert_equals(typeof(navigator.presentation.startSession), "function"); |
| 21 assert_equals(typeof(navigator.presentation.joinSession), "function"); | 21 assert_equals(typeof(navigator.presentation.joinSession), "function"); |
| 22 assert_equals(typeof(navigator.presentation.onavailablechange), "object"); | |
| 23 assert_equals(typeof(navigator.presentation.ondefaultsessionstart), "object"); | 22 assert_equals(typeof(navigator.presentation.ondefaultsessionstart), "object"); |
| 23 assert_equals(typeof(navigator.presentation.getAvailability), "function"); |
| 24 }, "Test the Presentation API property types."); | 24 }, "Test the Presentation API property types."); |
| 25 | 25 |
| 26 test(function() { | 26 test(function() { |
| 27 assert_true(navigator.presentation instanceof EventTarget); | 27 assert_true(navigator.presentation instanceof EventTarget); |
| 28 }, "Test that navigator.presentation is an EventTarget."); | 28 }, "Test that navigator.presentation is an EventTarget."); |
| 29 | 29 |
| 30 </script> | 30 </script> |
| 31 </body> | 31 </body> |
| 32 </html> | 32 </html> |
| 33 | |
| OLD | NEW |