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

Unified Diff: third_party/WebKit/LayoutTests/media/seek-stops-autoplay.html

Issue 1482393003: Clear m_autoplaying when starting auto playback. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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
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>

Powered by Google App Engine
This is Rietveld 408576698