Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(301)

Unified Diff: third_party/WebKit/LayoutTests/compositing/video/video-reflection.html

Issue 2257043002: Remove video-test.js dependency from video-reflection.html (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address comments Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/compositing/video/video-reflection-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/compositing/video/video-reflection.html
diff --git a/third_party/WebKit/LayoutTests/compositing/video/video-reflection.html b/third_party/WebKit/LayoutTests/compositing/video/video-reflection.html
index 2e07e350771a483c5d4cbf05056d1b4f7d157eb5..3312ea40526865f2320c0e971e11671b50e32102 100644
--- a/third_party/WebKit/LayoutTests/compositing/video/video-reflection.html
+++ b/third_party/WebKit/LayoutTests/compositing/video/video-reflection.html
@@ -1,45 +1,24 @@
<!DOCTYPE html>
-<html>
- <head>
- <script src="../../media/media-file.js"></script>
- <!-- TODO(foolip): Convert test to testharness.js. crbug.com/588956
- (Please avoid writing new tests using video-test.js) -->
- <script src="../../media/video-test.js"></script>
- <script type="text/javascript">
- var testedOnce = false;
- if (window.testRunner) {
- window.testRunner.dumpAsTextWithPixelResults();
- window.testRunner.waitUntilDone();
- }
- function runTest() {
- video = document.getElementById('video');
- video.addEventListener('canplaythrough', canplaythrough, true);
- video.src = findMediaFile('video', '../../media/content/test');
- }
- function canplaythrough(e) {
- var video = e.target;
- video.addEventListener('seeked', seeked, true);
- video.currentTime = 1;
- }
- function seeked(e) {
- if (!testedOnce) {
- testExpected('video.currentTime', 1);
+<title>Test "-webkit-box-reflect" property on a video element.</title>
+<script src="../../resources/run-after-layout-and-paint.js"></script>
+<script src="../../media/media-file.js"></script>
+<style>
+video {
+ -webkit-box-reflect: below 0px;
+ border: 3px solid red;
+}
+</style>
+<video></video>
+<script>
+testRunner.dumpAsTextWithPixelResults();
+testRunner.waitUntilDone();
- if (window.testRunner)
- setTimeout(function() { testRunner.notifyDone(); }, 150);
+var video = document.querySelector('video');
+video.onseeked = function() {
+ video.onseeked = null;
+ runAfterLayoutAndPaint(function() {}, true);
+};
- testedOnce = true;
- }
- }
- </script>
- <style>
- video {
- -webkit-box-reflect: below 0px;
- border: 3px solid red;
- }
- </style>
- </head>
- <body onload="runTest()">
- <video id="video"></video>
- </body>
-</html>
+video.src = findMediaFile('video', '../../media/content/test');
+video.currentTime = 1;
+</script>
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/compositing/video/video-reflection-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698