| Index: third_party/WebKit/LayoutTests/media/video-autoplay-experiment-just-once.html
|
| diff --git a/third_party/WebKit/LayoutTests/media/video-autoplay-experiment-just-once.html b/third_party/WebKit/LayoutTests/media/video-autoplay-experiment-just-once.html
|
| deleted file mode 100644
|
| index 77064e7a8a427c08c1a6ba0dbf4f51bee0a658f2..0000000000000000000000000000000000000000
|
| --- a/third_party/WebKit/LayoutTests/media/video-autoplay-experiment-just-once.html
|
| +++ /dev/null
|
| @@ -1,78 +0,0 @@
|
| -<!DOCTYPE html>
|
| -<script src=media-file.js></script>
|
| -<script>
|
| -function runTest() {
|
| - var canPlayThroughCount = 0;
|
| - var videoShouldPlay;
|
| - var videoShouldNotPlay;
|
| -
|
| - testRunner.waitUntilDone();
|
| - testRunner.dumpAsText();
|
| -
|
| - function canPlayThrough() {
|
| - canPlayThroughCount++;
|
| - if (canPlayThroughCount == 2) {
|
| - // Pause() will clear the autoplaying flag, which should also prevent the
|
| - // gesture override experiment from autoplaying.
|
| - videoShouldNotPlay.pause();
|
| -
|
| - // Scroll them into view, and see if they start playing.
|
| - parent.scrollIntoView(true);
|
| - // TODO(liberato): remove once autoplay gesture override experiment concludes.
|
| - internals.triggerAutoplayViewportCheck(videoShouldPlay);
|
| - internals.triggerAutoplayViewportCheck(videoShouldNotPlay);
|
| - var result;
|
| - if (didPlaybackStart(videoShouldPlay))
|
| - result = document.createTextNode("PASS First video is playing");
|
| - else
|
| - result = document.createTextNode("FAIL First video isn't playing");
|
| - document.body.appendChild(result);
|
| -
|
| - document.body.appendChild(document.createElement("br"));
|
| -
|
| - if (!didPlaybackStart(videoShouldNotPlay))
|
| - result = document.createTextNode("PASS Second video isn't playing");
|
| - else
|
| - result = document.createTextNode("FAIL Second video is playing");
|
| - document.body.appendChild(result);
|
| - testRunner.notifyDone();
|
| - }
|
| - }
|
| -
|
| - function prepareVideo(parent) {
|
| - var video = document.createElement("video");
|
| - video.oncanplaythrough = canPlayThrough;
|
| - video.src = findMediaFile("video", "content/test");
|
| - video.autoplay = true;
|
| - parent.appendChild(video);
|
| -
|
| - return video;
|
| - }
|
| -
|
| - function didPlaybackStart(element) {
|
| - return !element.paused || element.ended;
|
| - }
|
| -
|
| - // Start the videos off-screen.
|
| - var spacer = document.createElement("div");
|
| - spacer.style.height="1000px";
|
| - spacer.style.bgcolor="blue";
|
| - spacer.innerHTML="<p></p>";
|
| - document.body.appendChild(spacer);
|
| -
|
| - // Create a container for the videos.
|
| - var parent = document.createElement("div");
|
| - document.body.appendChild(parent);
|
| -
|
| - // Require a user gesture, but override it for visible videos.
|
| - internals.settings.setMediaPlaybackRequiresUserGesture(true);
|
| - internals.settings.setAutoplayExperimentMode("enabled-forvideo-ifviewport");
|
| -
|
| - videoShouldPlay = prepareVideo(parent);
|
| - videoShouldNotPlay = prepareVideo(parent);
|
| -}
|
| -</script>
|
| -<p>Test that the autoplay experiment doesn't play media once the media
|
| -is no longer eligible for autoplay.</p>
|
| -<body onLoad="runTest()">
|
| -</body>
|
|
|