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

Unified Diff: third_party/WebKit/LayoutTests/media/video-dom-autoplay.html

Issue 2079203002: Convert video-dom* tests to testharness.js. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address nits Created 4 years, 6 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/video-dom-autoplay-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/video-dom-autoplay.html
diff --git a/third_party/WebKit/LayoutTests/media/video-dom-autoplay.html b/third_party/WebKit/LayoutTests/media/video-dom-autoplay.html
index 1f52077d70bdeac2131e5cc8b6ebe06458f4f986..8aaf56e22d5f403f4d27cdb792554220e19009a3 100644
--- a/third_party/WebKit/LayoutTests/media/video-dom-autoplay.html
+++ b/third_party/WebKit/LayoutTests/media/video-dom-autoplay.html
@@ -1,17 +1,21 @@
-<video controls></video>
-<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>
+<!DOCTYPE html>
+<title>Test media "autoplay" attribute set via DOM.</title>
+<script src="../resources/testharness.js"></script>
+<script src="../resources/testharnessreport.js"></script>
+<script src="media-file.js"></script>
+<video></video>
<script>
- testExpected("video.autoplay", false);
+async_test(function(t) {
+ var video = document.querySelector("video");
+ assert_false(video.autoplay);
video.autoplay = true;
- testExpected("video.autoplay", true);
- testExpected("video.getAttribute('autoplay')", null, "!=");
- waitForEvent('play', function () {
- testExpected("video.paused", false);
- endTest();
- } );
+ assert_true(video.autoplay);
+ assert_not_equals(video.getAttribute("autoplay"), null);
+
+ video.onplay = t.step_func_done(function() {
+ assert_false(video.paused);
+ });
video.src = findMediaFile("video", "content/test");
-</script>
+});
+</script>
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/media/video-dom-autoplay-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698