OLD | NEW |
1 <script src=media-file.js></script> | 1 <script src=media-file.js></script> |
| 2 <!-- TODO(philipj): Convert test to testharness.js. crbug.com/588956 |
| 3 (Please avoid writing new tests using video-test.js) --> |
2 <script src=video-test.js></script> | 4 <script src=video-test.js></script> |
3 <script> | 5 <script> |
4 | 6 |
5 function runTest() | 7 function runTest() |
6 { | 8 { |
7 function prepareVideo(parent) | 9 function prepareVideo(parent) |
8 { | 10 { |
9 var video = document.createElement("video"); | 11 var video = document.createElement("video"); |
10 video.src = findMediaFile("video", "content/test"); | 12 video.src = findMediaFile("video", "content/test"); |
11 video.autoplay = true; | 13 video.autoplay = true; |
(...skipping 27 matching lines...) Expand all Loading... |
39 logResult(didPlaybackStart(videoShouldPlay), "First video should play"); | 41 logResult(didPlaybackStart(videoShouldPlay), "First video should play"); |
40 logResult(!didPlaybackStart(videoShouldNotPlay), "Second video should not pl
ay"); | 42 logResult(!didPlaybackStart(videoShouldNotPlay), "Second video should not pl
ay"); |
41 testRunner.notifyDone(); | 43 testRunner.notifyDone(); |
42 } | 44 } |
43 | 45 |
44 </script> | 46 </script> |
45 <p>Test that the autoplay experiment doesn't play media once the media | 47 <p>Test that the autoplay experiment doesn't play media once the media |
46 is no longer eligible for autoplay.</p> | 48 is no longer eligible for autoplay.</p> |
47 <body onLoad="runTest()"> | 49 <body onLoad="runTest()"> |
48 </body> | 50 </body> |
OLD | NEW |