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

Unified Diff: third_party/WebKit/LayoutTests/media/before-load-member-access.html

Issue 2019643002: Convert before-*, broken-* and constructors.html 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/before-load-member-access-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/before-load-member-access.html
diff --git a/third_party/WebKit/LayoutTests/media/before-load-member-access.html b/third_party/WebKit/LayoutTests/media/before-load-member-access.html
index cbb3b0835304251ea9838c4507136a0bc85a06e6..643e884e1bfd19f550a933199c816d30ee5fd3d4 100644
--- a/third_party/WebKit/LayoutTests/media/before-load-member-access.html
+++ b/third_party/WebKit/LayoutTests/media/before-load-member-access.html
@@ -1,28 +1,14 @@
-<html>
- <head>
- <title>Test that accessing member of a non loaded video works.</title>
- <!-- 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 test()
- {
- findMediaElement();
-
- run("video.played");
- run("video.buffered");
- run("video.seekable");
- run("video.volume");
- consoleWrite("SUCCESS");
- endTest();
- }
- </script>
- </head>
-
-<body onload="test()">
-
- <video controls></video>
- <p>Test that accessing member of a non loaded video works.</p>
-
-</body>
-</html>
+<!DOCTYPE HTML>
+<title>Test that accessing member of a non loaded video works.</title>
+<script src="../resources/testharness.js"></script>
+<script src="../resources/testharnessreport.js"></script>
+<video></video>
+<script>
+test(function() {
+ var video = document.querySelector("video");
+ assert_equals(video.played.length, 0);
+ assert_equals(video.buffered.length, 0);
+ assert_equals(video.seekable.length, 0);
+ assert_equals(video.volume, 1);
+});
+</script>
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/media/before-load-member-access-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698