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

Side by Side Diff: LayoutTests/media/video-test.js

Issue 54713007: Hide the CC button for <audio> with <track>s (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: add test Created 7 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 unified diff | Download patch
OLDNEW
1 1
2 var video = null; 2 var video = null;
3 var mediaElement = document; // If not set, an event from any element will trigg er a waitForEvent() callback. 3 var mediaElement = document; // If not set, an event from any element will trigg er a waitForEvent() callback.
4 var console = null; 4 var console = null;
5 var printFullTestDetails = true; // This is optionaly switched of by test whose tested values can differ. (see disableFullTestDetailsPrinting()) 5 var printFullTestDetails = true; // This is optionaly switched of by test whose tested values can differ. (see disableFullTestDetailsPrinting())
6 var Failed = false; 6 var Failed = false;
7 7
8 var track = null; // Current TextTrack being tested. 8 var track = null; // Current TextTrack being tested.
9 var cues = null; // Current TextTrackCueList being tested. 9 var cues = null; // Current TextTrackCueList being tested.
10 var numberOfTrackTests = 0; 10 var numberOfTrackTests = 0;
(...skipping 28 matching lines...) Expand all
39 } 39 }
40 return console; 40 return console;
41 } 41 }
42 42
43 function findMediaElement() 43 function findMediaElement()
44 { 44 {
45 try { 45 try {
46 video = document.getElementsByTagName('video')[0]; 46 video = document.getElementsByTagName('video')[0];
47 if (video) 47 if (video)
48 mediaElement = video; 48 mediaElement = video;
49 else {
50 audio = document.getElementsByTagName('audio')[0];
51 if (audio)
52 mediaElement = audio;
53 }
49 } catch (ex) { } 54 } catch (ex) { }
50 } 55 }
51 56
52 function testAndEnd(testFuncString) 57 function testAndEnd(testFuncString)
53 { 58 {
54 test(testFuncString, true); 59 test(testFuncString, true);
55 } 60 }
56 61
57 function test(testFuncString, endit) 62 function test(testFuncString, endit)
58 { 63 {
(...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after
352 357
353 func(); 358 func();
354 } 359 }
355 360
356 requiredEvents = []; 361 requiredEvents = [];
357 for (var i = 0; i < eventList.length; i++) { 362 for (var i = 0; i < eventList.length; i++) {
358 requiredEvents[i] = eventList[i][1]; 363 requiredEvents[i] = eventList[i][1];
359 eventList[i][0].addEventListener(requiredEvents[i], _eventCallback, true ); 364 eventList[i][0].addEventListener(requiredEvents[i], _eventCallback, true );
360 } 365 }
361 } 366 }
OLDNEW
« no previous file with comments | « LayoutTests/media/video-controls-captions-multiple-clicks-expected.txt ('k') | Source/core/css/mediaControls.css » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698