| <!DOCTYPE html><!-- webkit-test-runner [ enableModernMediaControls=false ] --> |
| <title>airplay-allows-buffering</title> |
| <script src="media-file.js"></script> |
| <script src="video-test.js"></script> |
| waitFor(window, 'load').then(async event => { |
| run('internals.setMockMediaPlaybackTargetPickerEnabled(true)'); |
| run(`video.src = findMediaFile('video', 'content/test')`); |
| await waitFor(video, 'loadedmetadata'); |
| run(`video.parentNode.removeChild(video)`); |
| await testExpectedEventually('internals.elementShouldBufferData(video)', false); |
| run(`video.webkitShowPlaybackTargetPicker()`); |
| run(`internals.setMockMediaPlaybackTargetPickerState('Sleepy TV', 'DeviceAvailable')`); |
| await waitFor(video, 'webkitcurrentplaybacktargetiswirelesschanged'); |
| testExpected('video.webkitCurrentPlaybackTargetIsWireless', true); |
| await testExpectedEventually('internals.elementShouldBufferData(video)', true); |
| <video controls preload='metadata'></video> |