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

Unified Diff: third_party/WebKit/LayoutTests/media/media-can-load-when-hidden.html

Issue 2028463002: Convert media-can-* tests to testharness.js (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address comments Created 4 years, 7 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/media/media-can-load-when-hidden-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/media/media-can-load-when-hidden.html
diff --git a/third_party/WebKit/LayoutTests/media/media-can-load-when-hidden.html b/third_party/WebKit/LayoutTests/media/media-can-load-when-hidden.html
index 0d9912e7572acf79a2fe0147bd3c9856b5282b0b..d3e2858df1222abef8c591087b31cf77a12c1c71 100644
--- a/third_party/WebKit/LayoutTests/media/media-can-load-when-hidden.html
+++ b/third_party/WebKit/LayoutTests/media/media-can-load-when-hidden.html
@@ -1,26 +1,16 @@
-<html>
- <head>
- <style>
- video {display:none; background-color: yellow; width: 320px; height: 240px;}
- </style>
- </head>
- <body onload="start()">
-
- <video controls ></video>
-
- <p>Test HTMLMediaElement to be sure that the video is getting loaded even if the element
- is hidden.</p>
- <script src=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=video-test.js></script>
- <script>
- function start()
- {
- video = document.getElementsByTagName('video')[0];
- waitForEvent('durationchange', function() { endTest(); });
- video.src = findMediaFile("video", "content/test");
- }
- </script>
- </body>
-</html>
+<!DOCTYPE html>
+<title>Test HTMLMediaElement to be sure that the video is getting loaded even if the element is hidden.</title>
+<style>
+ video { display: none; }
+</style>
+<video></video>
+<script src="media-file.js"></script>
+<script src="../resources/testharness.js"></script>
+<script src="../resources/testharnessreport.js"></script>
+<script>
+async_test(function(t) {
+ var video = document.querySelector("video");
+ video.ondurationchange = t.step_func_done();
+ video.src = findMediaFile("video", "content/test");
+});
+</script>
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/media/media-can-load-when-hidden-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698