| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <html> | 2 <html> |
| 3 <head> | 3 <head> |
| 4 <title>Test muted autoplay videos interaction with data saver on</title> | 4 <title>Test muted autoplay videos interaction with data saver on</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 window.internals.settings.setMediaPlaybackRequiresUserGesture(true); | 11 window.internals.settings.setAutoplayPolicy('user-gesture-required'); |
| 12 window.internals.runtimeFlags.autoplayMutedVideosEnabled = true; | 12 window.internals.runtimeFlags.autoplayMutedVideosEnabled = true; |
| 13 window.internals.settings.setDataSaverEnabled(false); | 13 window.internals.settings.setDataSaverEnabled(false); |
| 14 | 14 |
| 15 promise_test(function(t) | 15 promise_test(function(t) |
| 16 { | 16 { |
| 17 var video = document.createElement('video'); | 17 var video = document.createElement('video'); |
| 18 video.src = findMediaFile('video', 'content/test'); | 18 video.src = findMediaFile('video', 'content/test'); |
| 19 video.muted = true; | 19 video.muted = true; |
| 20 return video.play(); | 20 return video.play(); |
| 21 }); | 21 }); |
| 22 </script> | 22 </script> |
| 23 </body> | 23 </body> |
| 24 </html> | 24 </html> |
| OLD | NEW |