| OLD | NEW |
| 1 <html> | 1 <html> |
| 2 <head> | 2 <head> |
| 3 <title>Test that media autoplay should not work if user gesture is requi
red for playback</title> | 3 <title>Test that media autoplay should not work if user gesture is requi
red for playback</title> |
| 4 <script src=media-file.js></script> | 4 <script src=media-file.js></script> |
| 5 <!-- TODO(philipj): Convert test to testharness.js. crbug.com/588956 |
| 6 (Please avoid writing new tests using video-test.js) --> |
| 5 <script src=video-test.js></script> | 7 <script src=video-test.js></script> |
| 6 <script> | 8 <script> |
| 7 if (window.internals) | 9 if (window.internals) |
| 8 window.internals.settings.setMediaPlaybackRequiresUserGesture(tr
ue); | 10 window.internals.settings.setMediaPlaybackRequiresUserGesture(tr
ue); |
| 9 | 11 |
| 10 function testPlay() | 12 function testPlay() |
| 11 { | 13 { |
| 12 failTest("play event should not fire without user gesture."); | 14 failTest("play event should not fire without user gesture."); |
| 13 } | 15 } |
| 14 | 16 |
| 15 function testPaused() | 17 function testPaused() |
| 16 { | 18 { |
| 17 testExpected("video.paused", true); | 19 testExpected("video.paused", true); |
| (...skipping 14 matching lines...) Expand all Loading... |
| 32 waitForEvent('play', testPlay); | 34 waitForEvent('play', testPlay); |
| 33 } | 35 } |
| 34 </script> | 36 </script> |
| 35 </head> | 37 </head> |
| 36 | 38 |
| 37 <body onload="start()"> | 39 <body onload="start()"> |
| 38 <p>Test that media autoplay should not work if user gesture is required for
playback.</p> | 40 <p>Test that media autoplay should not work if user gesture is required for
playback.</p> |
| 39 <video controls autoplay></video> | 41 <video controls autoplay></video> |
| 40 </body> | 42 </body> |
| 41 </html> | 43 </html> |
| OLD | NEW |