| OLD | NEW |
| (Empty) |
| 1 <!DOCTYPE html> | |
| 2 <html> | |
| 3 <head> | |
| 4 <title>Test that calling cancelWatchAvailability() when disableRemotePla
yback attribute is set throws an exception</title> | |
| 5 <script src="../../resources/testharness.js"></script> | |
| 6 <script src="../../resources/testharnessreport.js"></script> | |
| 7 <script src="../media-file.js"></script> | |
| 8 </head> | |
| 9 <body> | |
| 10 <script> | |
| 11 async_test(function(t) | |
| 12 { | |
| 13 var v = document.createElement('video'); | |
| 14 var invalidStateErrorException = new DOMException( | |
| 15 'disableRemotePlayback attribute is present.', | |
| 16 'InvalidStateError'); | |
| 17 v.src = findMediaFile('video', 'content/test'); | |
| 18 document.body.appendChild(v); | |
| 19 | |
| 20 v.remote.watchAvailability(function() {}) | |
| 21 .then(function(id) { | |
| 22 v.disableRemotePlayback = true; | |
| 23 v.remote.cancelWatchAvailability(id).then( | |
| 24 t.unreached_func(), | |
| 25 t.step_func(function(e) { | |
| 26 assert_equals(e.name, invalidStateErrorException
.name); | |
| 27 assert_equals(e.message, invalidStateErrorExcept
ion.message); | |
| 28 v.remote.cancelWatchAvailability().then( | |
| 29 t.unreached_func(), | |
| 30 t.step_func_done(function(e) { | |
| 31 assert_equals(e.name, invalidStateErrorE
xception.name); | |
| 32 assert_equals(e.message, invalidStateErr
orException.message); | |
| 33 }) | |
| 34 ); | |
| 35 })); | |
| 36 }, | |
| 37 t.unreached_func()); | |
| 38 }, 'Test that calling cancelWatchAvailability() when disableRemotePl
ayback attribute is set throws an exception.'); | |
| 39 </script> | |
| 40 </body> | |
| 41 </html> | |
| OLD | NEW |