Index: third_party/WebKit/LayoutTests/media/seek-stops-autoplay.html |
diff --git a/third_party/WebKit/LayoutTests/media/seek-stops-autoplay.html b/third_party/WebKit/LayoutTests/media/seek-stops-autoplay.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..15f24dd093ea85a97b5cc9637a3a41381e3b9832 |
--- /dev/null |
+++ b/third_party/WebKit/LayoutTests/media/seek-stops-autoplay.html |
@@ -0,0 +1,29 @@ |
+<!doctype html> |
+<title>seek-stops-autoplay</title> |
philipj_slow
2015/12/01 09:45:39
I think a more accurate title would be "autoplay c
liberato (no reviews please)
2015/12/01 23:53:52
done, and yeah i'd like to do send to web platform
|
+<script src="../resources/testharness.js"></script> |
+<script src="../resources/testharnessreport.js"></script> |
+<script src="media-file.js"></script> |
+<div id="log"></div> |
+<script> |
+function seek_stops_autoplay_test(tagName, src) |
philipj_slow
2015/12/01 09:45:39
Since you're only calling this once, you could act
liberato (no reviews please)
2015/12/01 23:53:52
Done.
|
+{ |
+ async_test(function(t) |
+ { |
+ var e = document.createElement(tagName); |
+ e.src = src; |
+ e.autoplay = true; |
+ e.addEventListener('ended', function() |
+ { |
+ e.currentTime = 0; |
+ }); |
+ e.addEventListener('seeked', t.step_func(function() |
+ { |
+ assert_true(e.paused); |
philipj_slow
2015/12/01 09:45:39
Also assert_equals(e.readyState, e.HAVE_ENOUGH_DAT
liberato (no reviews please)
2015/12/01 23:53:52
ran ~250 times before and ~250 after. 100% fail /
|
+ t.done(); |
+ })); |
+ document.body.appendChild(e); |
+ }, tagName + '.seek_stops_autoplay'); |
+} |
+ |
+seek_stops_autoplay_test('audio', 'data:audio/wav;base64,UklGRjQAAABXQVZFZm10IBAAAAABAAEAQB8AAIA+AAACABAAZGF0YRAAAAAAAAAA//8CAP3/BAD7/wQA'); |
+</script> |