Upstream version 7.36.149.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / LayoutTests / compositing / resources / media-testing.js
index 4caa0b7..ace3320 100644 (file)
@@ -2,30 +2,9 @@
 if (window.testRunner)
     testRunner.waitUntilDone();
 
-function ensureFrameVisible(video, videoRenderedCallback)
-{
-    var playingHandler = function() {
-        video.pause();
-        video.currentTime = 0;
-    };
-
-    var seekedHandler = function() {
-        if (videoRenderedCallback)
-            videoRenderedCallback();
-    };
-
-    video.addEventListener('playing', playingHandler, false);
-    video.addEventListener('seeked', seekedHandler, false);
-    video.play();
-}
-
-function setupVideo(videoElement, videoPath, canPlayThroughCallback, videoRenderedCallback)
+function setupVideo(videoElement, videoPath, canPlayThroughCallback)
 {
     var mediaFile = findMediaFile("video", videoPath);
-    videoElement.addEventListener("canplaythrough", function () {
-        if (canPlayThroughCallback)
-            canPlayThroughCallback();
-        ensureFrameVisible(this, videoRenderedCallback);
-    }, false);
+    videoElement.addEventListener("canplaythrough", canPlayThroughCallback);
     videoElement.src = mediaFile;
 }