| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 } |
| OLD | NEW |