Skip to content

Commit

Permalink
vjsstandard - Tests - one missed file (#3497)
Browse files Browse the repository at this point in the history
  • Loading branch information
brandonocasey authored and misteroneill committed Aug 4, 2016
1 parent a16d710 commit 12a72f7
Showing 1 changed file with 20 additions and 20 deletions.
40 changes: 20 additions & 20 deletions test/unit/tracks/text-track-list-converter.test.js
Expand Up @@ -7,13 +7,13 @@ import document from 'global/document';

QUnit.module('Text Track List Converter', {});

let clean = (item) => {
const clean = (item) => {
delete item.id;
delete item.inBandMetadataTrackDispatchType;
delete item.cues;
};

let cleanup = (item) => {
const cleanup = (item) => {
if (Array.isArray(item)) {
item.forEach(clean);
} else {
Expand All @@ -25,7 +25,7 @@ let cleanup = (item) => {

if (Html5.supportsNativeTextTracks()) {
QUnit.test('trackToJson_ produces correct representation for native track object', function(a) {
let track = document.createElement('track');
const track = document.createElement('track');

track.src = 'example.com/english.vtt';
track.kind = 'captions';
Expand All @@ -41,25 +41,25 @@ if (Html5.supportsNativeTextTracks()) {
});

QUnit.test('textTracksToJson produces good json output', function(a) {
let emulatedTrack = new TextTrack({
const emulatedTrack = new TextTrack({
kind: 'captions',
label: 'English',
language: 'en',
tech: {}
});

let nativeTrack = document.createElement('track');
const nativeTrack = document.createElement('track');

nativeTrack.kind = 'captions';
nativeTrack.srclang = 'es';
nativeTrack.label = 'Spanish';

let tt = new TextTrackList();
const tt = new TextTrackList();

tt.addTrack_(nativeTrack.track);
tt.addTrack_(emulatedTrack);

let tech = {
const tech = {
$$() {
return [nativeTrack];
},
Expand Down Expand Up @@ -90,28 +90,28 @@ if (Html5.supportsNativeTextTracks()) {
});

QUnit.test('jsonToTextTracks calls addRemoteTextTrack on the tech with mixed tracks', function(a) {
let emulatedTrack = new TextTrack({
const emulatedTrack = new TextTrack({
kind: 'captions',
label: 'English',
language: 'en',
src: 'example.com/english.vtt',
tech: {}
});

let nativeTrack = document.createElement('track');
const nativeTrack = document.createElement('track');

nativeTrack.src = 'example.com/spanish.vtt';
nativeTrack.kind = 'captions';
nativeTrack.srclang = 'es';
nativeTrack.label = 'Spanish';

let tt = new TextTrackList();
const tt = new TextTrackList();

tt.addTrack_(nativeTrack.track);
tt.addTrack_(emulatedTrack);

let addRemotes = 0;
let tech = {
const tech = {
$$() {
return [nativeTrack];
},
Expand Down Expand Up @@ -141,7 +141,7 @@ if (Html5.supportsNativeTextTracks()) {
}

QUnit.test('trackToJson_ produces correct representation for emulated track object', function(a) {
let track = new TextTrack({
const track = new TextTrack({
kind: 'captions',
label: 'English',
language: 'en',
Expand All @@ -159,28 +159,28 @@ QUnit.test('trackToJson_ produces correct representation for emulated track obje
});

QUnit.test('textTracksToJson produces good json output for emulated only', function(a) {
let emulatedTrack = new TextTrack({
const emulatedTrack = new TextTrack({
kind: 'captions',
label: 'English',
language: 'en',
src: 'example.com/english.vtt',
tech: {}
});

let anotherTrack = new TextTrack({
const anotherTrack = new TextTrack({
src: 'example.com/spanish.vtt',
kind: 'captions',
srclang: 'es',
label: 'Spanish',
tech: {}
});

let tt = new TextTrackList();
const tt = new TextTrackList();

tt.addTrack_(anotherTrack);
tt.addTrack_(emulatedTrack);

let tech = {
const tech = {
$$() {
return [];
},
Expand Down Expand Up @@ -213,29 +213,29 @@ QUnit.test('textTracksToJson produces good json output for emulated only', funct
});

QUnit.test('jsonToTextTracks calls addRemoteTextTrack on the tech with emulated tracks only', function(a) {
let emulatedTrack = new TextTrack({
const emulatedTrack = new TextTrack({
kind: 'captions',
label: 'English',
language: 'en',
src: 'example.com/english.vtt',
tech: {}
});

let anotherTrack = new TextTrack({
const anotherTrack = new TextTrack({
src: 'example.com/spanish.vtt',
kind: 'captions',
srclang: 'es',
label: 'Spanish',
tech: {}
});

let tt = new TextTrackList();
const tt = new TextTrackList();

tt.addTrack_(anotherTrack);
tt.addTrack_(emulatedTrack);

let addRemotes = 0;
let tech = {
const tech = {
$$() {
return [];
},
Expand Down

0 comments on commit 12a72f7

Please sign in to comment.