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

Side by Side Diff: LayoutTests/media/autoplay.html

Issue 169223003: Fire canplaythrough after play and playing when autoplaying (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 10 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 <!doctype html>
2 <title>autoplay</title>
3 <script src="../resources/testharness.js"></script>
4 <script src="../resources/testharnessreport.js"></script>
5 <script src="media-file.js"></script>
6 <div id="log"></div>
7 <script>
8 function autoplay_test(tagName, src) {
acolwell GONE FROM CHROMIUM 2014/02/18 18:30:37 nit: 4-space indent here and everywhere else in th
philipj_slow 2014/02/19 03:10:05 I thought it was best to minimize the changes to t
9 async_test(function(t) {
10 var e = document.createElement(tagName);
11 e.src = src;
12 e.autoplay = true;
13 var actual_events = [];
14 var expected_events = ['canplay', 'play', 'playing', 'canplaythrough'];
15 expected_events.forEach(function(type) {
acolwell GONE FROM CHROMIUM 2014/02/18 18:30:37 nit: { on next line here and below to match Blink
16 e.addEventListener(type, t.step_func(function() {
17 assert_equals(e.readyState, e.HAVE_ENOUGH_DATA);
18 assert_false(e.paused);
19 actual_events.push(type);
20 if (type == 'canplaythrough') {
21 assert_array_equals(actual_events, expected_events);
22 t.done();
23 }
24 }));
25 });
26 }, tagName + '.autoplay');
27 }
28
29 autoplay_test('audio', findMediaFile('audio', 'content/test'));
30 autoplay_test('video', findMediaFile('video', 'content/test'));
31 </script>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/media/autoplay-expected.txt » ('j') | Source/core/html/HTMLMediaElement.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698