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> |