| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <html> | 2 <html> |
| 3 <head> | 3 <head> |
| 4 <title>Test that calling prompt() when disableRemotePlayback attribute i
s set throws an exception</title> | 4 <title>Test that calling watchAvailability() when disableRemotePlayback
attribute is set throws an exception</title> |
| 5 <script src="../../resources/testharness.js"></script> | 5 <script src="../../resources/testharness.js"></script> |
| 6 <script src="../../resources/testharnessreport.js"></script> | 6 <script src="../../resources/testharnessreport.js"></script> |
| 7 <script src="../media-file.js"></script> | 7 <script src="../media-file.js"></script> |
| 8 </head> | 8 </head> |
| 9 <body> | 9 <body> |
| 10 <script> | 10 <script> |
| 11 promise_test(function(test) | 11 promise_test(function(test) |
| 12 { | 12 { |
| 13 var v = document.createElement('video'); | 13 var v = document.createElement('video'); |
| 14 v.src = findMediaFile('video', 'content/test'); | 14 v.src = findMediaFile('video', 'content/test'); |
| 15 v.disableRemotePlayback = true | 15 v.disableRemotePlayback = true; |
| 16 document.body.appendChild(v); | 16 document.body.appendChild(v); |
| 17 | 17 |
| 18 return promise_rejects( | 18 return promise_rejects( |
| 19 test, | 19 test, |
| 20 new DOMException('disableRemotePlayback attribute is present
.', 'InvalidStateError'), | 20 new DOMException('disableRemotePlayback attribute is present
.', 'InvalidStateError'), |
| 21 v.remote.prompt()); | 21 v.remote.watchAvailability(function() {})); |
| 22 }, 'Test that calling prompt() when disableRemotePlayback attribute
is set throws an exception.'); | 22 }, 'Test that calling watchAvailability() when disableRemotePlayback
attribute is set throws an exception.'); |
| 23 </script> | 23 </script> |
| 24 </body> | 24 </body> |
| 25 </html> | 25 </html> |
| OLD | NEW |