| <script src='media-file.js'></script> |
| <script src='video-test.js'></script> |
| internals.setMockMediaPlaybackTargetPickerEnabled(true); |
| internals.settings.setAllowsAirPlayForMediaPlayback(true); |
| consoleWrite('** create initial callback'); |
| video.remote.watchAvailability(callback).then(cancelInvalid); |
| function callback(available) { }; |
| function cancelInvalid(id) |
| consoleWrite('** pass invalid id to cancelWatchAvailability'); |
| video.remote.cancelWatchAvailability(id + 1).catch(handleError); |
| function handleError(exception) |
| consoleWrite(`EXPECTED ERROR: ${ exception }`); |
| <p>Test that passing an invalid id to cancelWatchAvailability will generate an error.</p> |