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

Side by Side Diff: third_party/WebKit/LayoutTests/media/media-controller-playback.html

Issue 1373423003: Remove MediaController (already diabled by REF) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: update web-platform-tests expectations Created 5 years, 2 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
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <script src=media-file.js></script>
5 <script src=video-test.js></script>
6
7 <script>
8 var controller;
9 var video2;
10
11 function start() {
12 var videos = document.getElementsByTagName('video');
13 video = videos[0];
14 video2 = videos[1];
15 run('controller = video.controller');
16 controller.addEventListener('canplaythrough', canplaythrough, true);
17 var src = findMediaFile('video', 'content/test');
18 video.src = src;
19 video2.src = src;
20 }
21
22 function canplaythrough() {
23 consoleWrite("EVENT(canplaythrough)");
24 controller.removeEventListener('canplaythrough', canplaythrough, tru e);
25
26 testException("controller.currentTime = -Infinity", '"TypeError: Fai led to set the \'currentTime\' property on \'MediaController\': The provided dou ble value is non-finite."');
27 testException("controller.currentTime = Infinity", '"TypeError: Fail ed to set the \'currentTime\' property on \'MediaController\': The provided doub le value is non-finite."');
28 testException("controller.currentTime = NaN", '"TypeError: Failed to set the \'currentTime\' property on \'MediaController\': The provided double va lue is non-finite."');
29
30 controller.addEventListener('playing', playing, true);
31 run('controller.play()');
32 }
33
34 function playing() {
35 consoleWrite("EVENT(playing)");
36 controller.removeEventListener('playing', playing, true);
37 testExpected('controller.paused', false);
38 controller.addEventListener('ended', ended, true);
39 run('controller.currentTime = 5');
40 testExpected('controller.currentTime', 5);
41 testExpected('video.currentTime', 5);
42 testExpected('video2.currentTime', 5);
43 }
44
45 function ended() {
46 consoleWrite("EVENT(ended)");
47 controller.removeEventListener('ended', ended, true);
48 endTest();
49 }
50 </script>
51 </head>
52 <body onload="start()">
53 <video mediaGroup="group" controls></video>
54 <video mediaGroup="group" controls></video>
55 </body>
56 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698