Index: third_party/WebKit/LayoutTests/media/audio-play-event.html |
diff --git a/third_party/WebKit/LayoutTests/media/audio-play-event.html b/third_party/WebKit/LayoutTests/media/audio-play-event.html |
index d20c9086c498ab8d35d89665820c949664477e05..e17ea8fef97805eb61e96f32c60cd8cc1d12dc80 100644 |
--- a/third_party/WebKit/LayoutTests/media/audio-play-event.html |
+++ b/third_party/WebKit/LayoutTests/media/audio-play-event.html |
@@ -1,28 +1,13 @@ |
-<html> |
- <head> |
- <title>'play' event</title> |
- <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() |
- { |
- mediaElement = new Audio(); |
- waitForEvent('error'); |
- waitForEvent('loadedmetadata'); |
- waitForEvent('canplay'); |
- waitForEvent('play'); |
- waitForEvent('playing', function() { endTest(); }); |
- run("mediaElement.src = findMediaFile('audio', 'content/test')"); |
- run("mediaElement.volume = 1"); |
- run("mediaElement.play()"); |
- } |
- </script> |
- </head> |
- |
- <body onload="start()"> |
- <p>Test that a 'play' event listener is triggered when fired by a new audio element.</p> |
- </body> |
-</html> |
+<!DOCTYPE HTML> |
+<title>Test that a 'play' event is fired by a new audio element on playing.</title> |
+<script src="media-file.js"></script> |
+<script src="../resources/testharness.js"></script> |
+<script src="../resources/testharnessreport.js"></script> |
+<script> |
+async_test(function(t) { |
+ var audio = new Audio(); |
+ audio.onplay = t.step_func_done(); |
Srirama
2016/05/26 15:09:50
Should we test playing event as well? Based on the
fs
2016/05/26 15:35:00
Can't say that I fully understand the reasoning be
Srirama
2016/05/26 17:27:51
Done.
|
+ audio.src = findMediaFile('audio', 'content/test'); |
+ audio.play(); |
+}); |
+</script> |