mirror of
https://github.com/hensm/fx_cast.git
synced 2026-06-11 18:19:58 +00:00
chrome.cast class tests
This commit is contained in:
72
test/spec/shim/cast/ApiConfig.spec.js
Normal file
72
test/spec/shim/cast/ApiConfig.spec.js
Normal file
@@ -0,0 +1,72 @@
|
||||
"use strict";
|
||||
|
||||
const { create } = require("../../../driver");
|
||||
|
||||
describe("chrome.cast.ApiConfig", () => {
|
||||
let driver;
|
||||
|
||||
beforeAll(async () => {
|
||||
driver = await create();
|
||||
});
|
||||
afterAll(() => {
|
||||
driver.quit();
|
||||
})
|
||||
|
||||
|
||||
it("should have all properties", async () => {
|
||||
const [ typeof_receiverListener
|
||||
, typeof_sessionListener
|
||||
, typeof_sessionRequest
|
||||
, apiConfig ] = await driver.executeScript(() => {
|
||||
|
||||
const apiConfig = new chrome.cast.ApiConfig();
|
||||
|
||||
return [
|
||||
typeof apiConfig.receiverListener
|
||||
, typeof apiConfig.sessionListener
|
||||
, typeof apiConfig.sessionRequest
|
||||
, apiConfig
|
||||
];
|
||||
});
|
||||
|
||||
expect(apiConfig.additionalSessionRequests).toEqual([]);
|
||||
expect(apiConfig.autoJoinPolicy).toBe("tab_and_origin_scoped");
|
||||
expect(apiConfig.customDialLaunchCallback).toBe(null);
|
||||
expect(apiConfig.defaultActionPolicy).toBe("create_session");
|
||||
expect(apiConfig.invisibleSender).toBe(false);
|
||||
expect(typeof_receiverListener).toBe("undefined");
|
||||
expect(typeof_sessionListener).toBe("undefined");
|
||||
expect(typeof_sessionRequest).toBe("undefined");
|
||||
});
|
||||
|
||||
it("should have expected assigned properties", async () => {
|
||||
const [ typeof_sessionListener
|
||||
, typeof_receiverListener
|
||||
, apiConfig ] = await driver.executeScript(() => {
|
||||
|
||||
const sessionRequest = new chrome.cast.SessionRequest(
|
||||
chrome.cast.media.DEFAULT_MEDIA_RECEIVER_APP_ID);
|
||||
|
||||
function sessionListener () {}
|
||||
function receiverListener () {}
|
||||
|
||||
const apiConfig = new chrome.cast.ApiConfig(
|
||||
sessionRequest
|
||||
, sessionListener
|
||||
, receiverListener
|
||||
, chrome.cast.AutoJoinPolicy.ORIGIN_SCOPED
|
||||
, chrome.cast.DefaultActionPolicy.CAST_THIS_TAB);
|
||||
|
||||
return [
|
||||
typeof sessionListener
|
||||
, typeof receiverListener
|
||||
, apiConfig
|
||||
];
|
||||
});
|
||||
|
||||
expect(typeof_sessionListener).toBe("function");
|
||||
expect(typeof_receiverListener).toBe("function");
|
||||
expect(apiConfig.autoJoinPolicy).toBe("origin_scoped");
|
||||
expect(apiConfig.defaultActionPolicy).toBe("cast_this_tab");
|
||||
});
|
||||
});
|
||||
42
test/spec/shim/cast/DialRequest.spec.js
Normal file
42
test/spec/shim/cast/DialRequest.spec.js
Normal file
@@ -0,0 +1,42 @@
|
||||
"use strict";
|
||||
|
||||
const { create } = require("../../../driver");
|
||||
|
||||
describe("chrome.cast.DialRequest", () => {
|
||||
let driver;
|
||||
|
||||
beforeAll(async () => {
|
||||
driver = await create();
|
||||
});
|
||||
afterAll(() => {
|
||||
driver.quit();
|
||||
})
|
||||
|
||||
|
||||
it("should have all properties", async () => {
|
||||
const [ typeof_appName
|
||||
, dialRequest ] = await driver.executeScript(() => {
|
||||
|
||||
const dialRequest = new chrome.cast.DialRequest();
|
||||
|
||||
return [
|
||||
typeof dialRequest.appName
|
||||
, dialRequest
|
||||
];
|
||||
});
|
||||
|
||||
expect(typeof_appName).toBe("undefined");
|
||||
expect(dialRequest.launchParameter).toBe(null);
|
||||
});
|
||||
|
||||
it("should have expected assigned properties", async () => {
|
||||
const dialRequest = await driver.executeScript(() => {
|
||||
return new chrome.cast.DialRequest(
|
||||
"testAppName"
|
||||
, "testLaunchParameter");
|
||||
});
|
||||
|
||||
expect(dialRequest.appName).toBe("testAppName");
|
||||
expect(dialRequest.launchParameter).toBe("testLaunchParameter");
|
||||
});
|
||||
});
|
||||
46
test/spec/shim/cast/Error.spec.js
Normal file
46
test/spec/shim/cast/Error.spec.js
Normal file
@@ -0,0 +1,46 @@
|
||||
"use strict";
|
||||
|
||||
const { create } = require("../../../driver");
|
||||
|
||||
describe("chrome.cast.Error", () => {
|
||||
let driver;
|
||||
|
||||
beforeAll(async () => {
|
||||
driver = await create();
|
||||
});
|
||||
afterAll(() => {
|
||||
driver.quit();
|
||||
})
|
||||
|
||||
|
||||
it("should have all properties", async () => {
|
||||
const [ typeof_code
|
||||
, error ] = await driver.executeScript(() => {
|
||||
|
||||
const error = new chrome.cast.Error();
|
||||
|
||||
return [
|
||||
typeof error.code
|
||||
, error
|
||||
];
|
||||
});
|
||||
|
||||
expect(typeof_code).toBe("undefined");
|
||||
expect(error.description).toBe(null);
|
||||
expect(error.details).toBe(null);
|
||||
});
|
||||
|
||||
it("should have expected assigned properties", async () => {
|
||||
const error = await driver.executeScript(() => {
|
||||
return new chrome.cast.Error(
|
||||
chrome.cast.ErrorCode.CANCEL
|
||||
, "testErrorDescription"
|
||||
, { testErrorDetails: "testErrorDetails" });
|
||||
});
|
||||
|
||||
expect(error.code).toBe("cancel");
|
||||
expect(error.description).toBe("testErrorDescription");
|
||||
expect(error.details).toEqual(
|
||||
{ testErrorDetails: "testErrorDetails" });
|
||||
});
|
||||
});
|
||||
40
test/spec/shim/cast/Image.spec.js
Normal file
40
test/spec/shim/cast/Image.spec.js
Normal file
@@ -0,0 +1,40 @@
|
||||
"use strict";
|
||||
|
||||
const { create } = require("../../../driver");
|
||||
|
||||
describe("chrome.cast.Image", () => {
|
||||
let driver;
|
||||
|
||||
beforeAll(async () => {
|
||||
driver = await create();
|
||||
});
|
||||
afterAll(() => {
|
||||
driver.quit();
|
||||
})
|
||||
|
||||
|
||||
it("should have all properties", async () => {
|
||||
const [ typeof_url
|
||||
, image ] = await driver.executeScript(() => {
|
||||
|
||||
const image = new chrome.cast.Image();
|
||||
|
||||
return [
|
||||
typeof image.url
|
||||
, image
|
||||
];
|
||||
});
|
||||
|
||||
expect(typeof_url).toBe("undefined");
|
||||
expect(image.height).toBe(null);
|
||||
expect(image.width).toBe(null);
|
||||
});
|
||||
|
||||
it("should have expected assigned properties", async () => {
|
||||
const image = await driver.executeScript(() => {
|
||||
return new chrome.cast.Image("http://example.com");
|
||||
});
|
||||
|
||||
expect(image.url).toBe("http://example.com");
|
||||
});
|
||||
});
|
||||
54
test/spec/shim/cast/Receiver.spec.js
Normal file
54
test/spec/shim/cast/Receiver.spec.js
Normal file
@@ -0,0 +1,54 @@
|
||||
"use strict";
|
||||
|
||||
const { create } = require("../../../driver");
|
||||
|
||||
describe("chrome.cast.Receiver", () => {
|
||||
let driver;
|
||||
|
||||
beforeAll(async () => {
|
||||
driver = await create();
|
||||
});
|
||||
afterAll(() => {
|
||||
driver.quit();
|
||||
})
|
||||
|
||||
|
||||
it("should have all properties", async () => {
|
||||
const [ typeof_friendlyName
|
||||
, typeof_label
|
||||
, receiver ] = await driver.executeScript(() => {
|
||||
|
||||
const receiver = new chrome.cast.Receiver();
|
||||
|
||||
return [
|
||||
typeof receiver.friendlyName
|
||||
, typeof receiver.label
|
||||
, receiver
|
||||
];
|
||||
});
|
||||
|
||||
expect(typeof_friendlyName).toBe("undefined");
|
||||
expect(typeof_label).toBe("undefined");
|
||||
expect(receiver.capabilities).toEqual([]);
|
||||
expect(receiver.displayStatus).toBe(null);
|
||||
expect(receiver.isActiveInput).toBe(null);
|
||||
expect(receiver.receiverType).toBe("cast");
|
||||
expect(receiver.volume).toBe(null);
|
||||
});
|
||||
|
||||
it("should have expected assigned properties", async () => {
|
||||
const error = await driver.executeScript(() => {
|
||||
return new chrome.cast.Receiver(
|
||||
"testLabel"
|
||||
, "testFriendlyName"
|
||||
, [ chrome.cast.Capability.VIDEO_OUT
|
||||
, chrome.cast.Capability.AUDIO_OUT ]
|
||||
, new chrome.cast.Volume(1, false));
|
||||
});
|
||||
|
||||
expect(error.capabilities).toEqual([ "video_out", "audio_out" ]);
|
||||
expect(error.friendlyName).toBe("testFriendlyName");
|
||||
expect(error.label).toBe("testLabel");
|
||||
expect(error.volume).toEqual({ level: 1, muted: false });
|
||||
});
|
||||
});
|
||||
52
test/spec/shim/cast/ReceiverDisplayStatus.spec.js
Normal file
52
test/spec/shim/cast/ReceiverDisplayStatus.spec.js
Normal file
@@ -0,0 +1,52 @@
|
||||
"use strict";
|
||||
|
||||
const { create } = require("../../../driver");
|
||||
|
||||
describe("chrome.cast.Receiver", () => {
|
||||
let driver;
|
||||
|
||||
beforeAll(async () => {
|
||||
driver = await create();
|
||||
});
|
||||
afterAll(() => {
|
||||
driver.quit();
|
||||
})
|
||||
|
||||
|
||||
it("should have all properties", async () => {
|
||||
const [ typeof_appImages
|
||||
, typeof_statusText
|
||||
, receiverDisplayStatus ] = await driver.executeScript(() => {
|
||||
|
||||
const receiverDisplayStatus =
|
||||
new chrome.cast.ReceiverDisplayStatus();
|
||||
|
||||
return [
|
||||
typeof receiverDisplayStatus.appImages
|
||||
, typeof receiverDisplayStatus.statusText
|
||||
, receiverDisplayStatus
|
||||
];
|
||||
});
|
||||
|
||||
expect(typeof_appImages).toBe("undefined");
|
||||
expect(typeof_statusText).toBe("undefined");
|
||||
expect(receiverDisplayStatus.showStop).toBe(null);
|
||||
});
|
||||
|
||||
it("should have expected assigned properties", async () => {
|
||||
const receiverDisplayStatus = await driver.executeScript(() => {
|
||||
return new chrome.cast.ReceiverDisplayStatus(
|
||||
"testStatusText"
|
||||
, [
|
||||
new chrome.cast.Image("http://example.com/1")
|
||||
, new chrome.cast.Image("http://example.com/2")
|
||||
]);
|
||||
});
|
||||
|
||||
expect(receiverDisplayStatus.statusText).toBe("testStatusText");
|
||||
expect(receiverDisplayStatus.appImages).toEqual([
|
||||
{ url: "http://example.com/1", height: null, width: null }
|
||||
, { url: "http://example.com/2", height: null, width: null }
|
||||
]);
|
||||
});
|
||||
});
|
||||
0
test/spec/shim/cast/SenderApplication.spec.js
Normal file
0
test/spec/shim/cast/SenderApplication.spec.js
Normal file
0
test/spec/shim/cast/Session.spec.js
Normal file
0
test/spec/shim/cast/Session.spec.js
Normal file
0
test/spec/shim/cast/SessionRequest.spec.js
Normal file
0
test/spec/shim/cast/SessionRequest.spec.js
Normal file
0
test/spec/shim/cast/Timeout.spec.js
Normal file
0
test/spec/shim/cast/Timeout.spec.js
Normal file
0
test/spec/shim/cast/Volume.spec.js
Normal file
0
test/spec/shim/cast/Volume.spec.js
Normal file
256
test/spec/shim/chrome.spec.js
Normal file
256
test/spec/shim/chrome.spec.js
Normal file
@@ -0,0 +1,256 @@
|
||||
"use strict";
|
||||
|
||||
const { create, destroy } = require("../../driver");
|
||||
|
||||
describe("chrome", () => {
|
||||
let driver;
|
||||
let chrome;
|
||||
|
||||
beforeAll(async () => {
|
||||
driver = await create();
|
||||
chrome = await driver.executeScript(() => {
|
||||
return chrome;
|
||||
});
|
||||
});
|
||||
afterAll(() => {
|
||||
driver.quit();
|
||||
});
|
||||
|
||||
|
||||
it("should exist", () => {
|
||||
expect(chrome).toBeDefined();
|
||||
expect(chrome.cast).toBeDefined();
|
||||
expect(chrome.cast.media).toBeDefined();
|
||||
});
|
||||
|
||||
|
||||
describe("chrome.cast", () => {
|
||||
it("should have all api methods", () => {
|
||||
expect(chrome.cast.addReceiverActionListener).toBeDefined();
|
||||
expect(chrome.cast.initialize).toBeDefined();
|
||||
expect(chrome.cast.logMessage).toBeDefined();
|
||||
expect(chrome.cast.precache).toBeDefined();
|
||||
expect(chrome.cast.removeReceiverActionListener).toBeDefined();
|
||||
expect(chrome.cast.requestSession).toBeDefined();
|
||||
expect(chrome.cast.requestSessionById).toBeDefined();
|
||||
expect(chrome.cast.setCustomReceivers).toBeDefined();
|
||||
expect(chrome.cast.setPageContext).toBeDefined();
|
||||
expect(chrome.cast.setReceiverDisplayStatus).toBeDefined();
|
||||
expect(chrome.cast.unescape).toBeDefined();
|
||||
});
|
||||
|
||||
it("should have all api classes", () => {
|
||||
expect(chrome.cast.ApiConfig).toBeDefined();
|
||||
expect(chrome.cast.DialRequest).toBeDefined();
|
||||
expect(chrome.cast.Error).toBeDefined();
|
||||
expect(chrome.cast.Image).toBeDefined();
|
||||
expect(chrome.cast.Receiver).toBeDefined();
|
||||
expect(chrome.cast.ReceiverDisplayStatus).toBeDefined();
|
||||
expect(chrome.cast.SenderApplication).toBeDefined();
|
||||
expect(chrome.cast.Session).toBeDefined();
|
||||
expect(chrome.cast.SessionRequest).toBeDefined();
|
||||
expect(chrome.cast.Timeout).toBeDefined();
|
||||
expect(chrome.cast.Volume).toBeDefined();
|
||||
});
|
||||
|
||||
it("should have all api enums", () => {
|
||||
expect(chrome.cast.AutoJoinPolicy).toEqual(jasmine.objectContaining({
|
||||
CUSTOM_CONTROLLER_SCOPED: "custom_controller_scoped"
|
||||
, TAB_AND_ORIGIN_SCOPED: "tab_and_origin_scoped"
|
||||
, ORIGIN_SCOPED: "origin_scoped"
|
||||
, PAGE_SCOPED: "page_scoped"
|
||||
}));
|
||||
|
||||
expect(chrome.cast.Capability).toEqual(jasmine.objectContaining({
|
||||
VIDEO_OUT: "video_out"
|
||||
, AUDIO_OUT: "audio_out"
|
||||
, VIDEO_IN: "video_in"
|
||||
, AUDIO_IN: "audio_in"
|
||||
, MULTIZONE_GROUP: "multizone_group"
|
||||
}));
|
||||
|
||||
expect(chrome.cast.DefaultActionPolicy).toEqual(jasmine.objectContaining({
|
||||
CREATE_SESSION: "create_session"
|
||||
, CAST_THIS_TAB: "cast_this_tab"
|
||||
}));
|
||||
|
||||
expect(chrome.cast.DialAppState).toEqual(jasmine.objectContaining({
|
||||
RUNNING: "running"
|
||||
, STOPPED: "stopped"
|
||||
, ERROR: "error"
|
||||
}));
|
||||
|
||||
expect(chrome.cast.ErrorCode).toEqual(jasmine.objectContaining({
|
||||
CANCEL: "cancel"
|
||||
, TIMEOUT: "timeout"
|
||||
, API_NOT_INITIALIZED: "api_not_initialized"
|
||||
, INVALID_PARAMETER: "invalid_parameter"
|
||||
, EXTENSION_NOT_COMPATIBLE: "extension_not_compatible"
|
||||
, EXTENSION_MISSING: "extension_missing"
|
||||
, RECEIVER_UNAVAILABLE: "receiver_unavailable"
|
||||
, SESSION_ERROR: "session_error"
|
||||
, CHANNEL_ERROR: "channel_error"
|
||||
, LOAD_MEDIA_FAILED: "load_media_failed"
|
||||
}));
|
||||
|
||||
expect(chrome.cast.ReceiverAction).toEqual(jasmine.objectContaining({
|
||||
CAST: "cast"
|
||||
, STOP: "stop"
|
||||
}));
|
||||
|
||||
expect(chrome.cast.ReceiverAvailability).toEqual(jasmine.objectContaining({
|
||||
AVAILABLE: "available"
|
||||
, UNAVAILABLE: "unavailable"
|
||||
}));
|
||||
|
||||
expect(chrome.cast.ReceiverType).toEqual(jasmine.objectContaining({
|
||||
CAST: "cast"
|
||||
, DIAL: "dial"
|
||||
, HANGOUT: "hangout"
|
||||
, CUSTOM: "custom"
|
||||
}));
|
||||
|
||||
expect(chrome.cast.SenderPlatform).toEqual(jasmine.objectContaining({
|
||||
CHROME: "chrome"
|
||||
, IOS: "ios"
|
||||
, ANDROID: "android"
|
||||
}));
|
||||
|
||||
expect(chrome.cast.SessionStatus).toEqual(jasmine.objectContaining({
|
||||
CONNECTED: "connected"
|
||||
, DISCONNECTED: "disconnected"
|
||||
, STOPPED: "stopped"
|
||||
}));
|
||||
|
||||
expect(chrome.cast.VolumeControlType).toEqual(jasmine.objectContaining({
|
||||
ATTENUATION: "attenuation"
|
||||
, FIXED: "fixed"
|
||||
, MASTER: "master"
|
||||
}));
|
||||
});
|
||||
});
|
||||
|
||||
describe("chrome.cast.media", () => {
|
||||
it ("should have all api classes", () => {
|
||||
expect(chrome.cast.media.EditTracksInfoRequest).toBeDefined();
|
||||
expect(chrome.cast.media.GenericMediaMetadata).toBeDefined();
|
||||
expect(chrome.cast.media.GetStatusRequest).toBeDefined();
|
||||
expect(chrome.cast.media.LoadRequest).toBeDefined();
|
||||
expect(chrome.cast.media.Media).toBeDefined();
|
||||
expect(chrome.cast.media.MediaInfo).toBeDefined();
|
||||
expect(chrome.cast.media.MovieMediaMetadata).toBeDefined();
|
||||
expect(chrome.cast.media.MusicTrackMediaMetadata).toBeDefined();
|
||||
expect(chrome.cast.media.PauseRequest).toBeDefined();
|
||||
expect(chrome.cast.media.PhotoMediaMetadata).toBeDefined();
|
||||
expect(chrome.cast.media.PlayRequest).toBeDefined();
|
||||
expect(chrome.cast.media.QueueInsertItemsRequest).toBeDefined();
|
||||
expect(chrome.cast.media.QueueItem).toBeDefined();
|
||||
expect(chrome.cast.media.QueueLoadRequest).toBeDefined();
|
||||
expect(chrome.cast.media.QueueRemoveItemsRequest).toBeDefined();
|
||||
expect(chrome.cast.media.QueueReorderItemsRequest).toBeDefined();
|
||||
expect(chrome.cast.media.QueueUpdateItemsRequest).toBeDefined();
|
||||
expect(chrome.cast.media.SeekRequest).toBeDefined();
|
||||
expect(chrome.cast.media.StopRequest).toBeDefined();
|
||||
expect(chrome.cast.media.TextTrackStyle).toBeDefined();
|
||||
expect(chrome.cast.media.Track).toBeDefined();
|
||||
expect(chrome.cast.media.TvShowMediaMetadata).toBeDefined();
|
||||
expect(chrome.cast.media.VolumeRequest).toBeDefined();
|
||||
});
|
||||
|
||||
it ("should have all api enums", () => {
|
||||
expect(chrome.cast.media.IdleReason).toEqual(jasmine.objectContaining({
|
||||
CANCELLED: "CANCELLED"
|
||||
, INTERRUPTED: "INTERRUPTED"
|
||||
, FINISHED: "FINISHED"
|
||||
, ERROR: "ERROR"
|
||||
}));
|
||||
expect(chrome.cast.media.MediaCommand).toEqual(jasmine.objectContaining({
|
||||
PAUSE: "pause"
|
||||
, SEEK: "seek"
|
||||
, STREAM_VOLUME: "stream_volume"
|
||||
, STREAM_MUTE: "stream_mute"
|
||||
}));
|
||||
expect(chrome.cast.media.MetadataType).toEqual(jasmine.objectContaining({
|
||||
GENERIC: 0
|
||||
, MOVIE: 1
|
||||
, TV_SHOW: 2
|
||||
, MUSIC_TRACK: 3
|
||||
, PHOTO: 4
|
||||
}));
|
||||
expect(chrome.cast.media.PlayerState).toEqual(jasmine.objectContaining({
|
||||
IDLE: "IDLE"
|
||||
, PLAYING: "PLAYING"
|
||||
, PAUSED: "PAUSED"
|
||||
, BUFFERING: "BUFFERING"
|
||||
}));
|
||||
expect(chrome.cast.media.RepeatMode).toEqual(jasmine.objectContaining({
|
||||
OFF: "REPEAT_OFF"
|
||||
, ALL: "REPEAT_ALL"
|
||||
, SINGLE: "REPEAT_SINGLE"
|
||||
, ALL_AND_SHUFFLE: "REPEAT_ALL_AND_SHUFFLE"
|
||||
}));
|
||||
expect(chrome.cast.media.ResumeState).toEqual(jasmine.objectContaining({
|
||||
PLAYBACK_START: "PLAYBACK_START"
|
||||
, PLAYBACK_PAUSE: "PLAYBACK_PAUSE"
|
||||
}));
|
||||
expect(chrome.cast.media.StreamType).toEqual(jasmine.objectContaining({
|
||||
BUFFERED: "BUFFERED"
|
||||
, LIVE: "LIVE"
|
||||
, OTHER: "OTHER"
|
||||
}));
|
||||
expect(chrome.cast.media.TextTrackEdgeType).toEqual(jasmine.objectContaining({
|
||||
NONE: "NONE"
|
||||
, OUTLINE: "OUTLINE"
|
||||
, DROP_SHADOW: "DROP_SHADOW"
|
||||
, RAISED: "RAISED"
|
||||
, DEPRESSED: "DEPRESSED"
|
||||
}));
|
||||
expect(chrome.cast.media.TextTrackFontGenericFamily).toEqual(jasmine.objectContaining({
|
||||
SANS_SERIF: "SANS_SERIF"
|
||||
, MONOSPACED_SANS_SERIF: "MONOSPACED_SANS_SERIF"
|
||||
, SERIF: "SERIF"
|
||||
, MONOSPACED_SERIF: "MONOSPACED_SERIF"
|
||||
, CASUAL: "CASUAL"
|
||||
, CURSIVE: "CURSIVE"
|
||||
, SMALL_CAPITALS: "SMALL_CAPITALS"
|
||||
}));
|
||||
expect(chrome.cast.media.TextTrackFontStyle).toEqual(jasmine.objectContaining({
|
||||
NORMAL: "NORMAL"
|
||||
, BOLD: "BOLD"
|
||||
, BOLD_ITALIC: "BOLD_ITALIC"
|
||||
, ITALIC: "ITALIC"
|
||||
}));
|
||||
expect(chrome.cast.media.TextTrackType).toEqual(jasmine.objectContaining({
|
||||
SUBTITLES: "SUBTITLES"
|
||||
, CAPTIONS: "CAPTIONS"
|
||||
, DESCRIPTIONS: "DESCRIPTIONS"
|
||||
, CHAPTERS: "CHAPTERS"
|
||||
, METADATA: "METADATA"
|
||||
}));
|
||||
expect(chrome.cast.media.TextTrackWindowType).toEqual(jasmine.objectContaining({
|
||||
NONE: "NONE"
|
||||
, NORMAL: "NORMAL"
|
||||
, ROUNDED_CORNERS: "ROUNDED_CORNERS"
|
||||
}));
|
||||
expect(chrome.cast.media.TrackType).toEqual(jasmine.objectContaining({
|
||||
TEXT: "TEXT"
|
||||
, AUDIO: "AUDIO"
|
||||
, VIDEO: "VIDEO"
|
||||
}));
|
||||
});
|
||||
|
||||
describe("chrome.cast.media.timeout", () => {
|
||||
it ("should have all properties", () => {
|
||||
expect(chrome.cast.media.timeout.editTracksInfo).toBe(0);
|
||||
expect(chrome.cast.media.timeout.getStatus).toBe(0);
|
||||
expect(chrome.cast.media.timeout.load).toBe(0);
|
||||
expect(chrome.cast.media.timeout.pause).toBe(0);
|
||||
expect(chrome.cast.media.timeout.play).toBe(0);
|
||||
expect(chrome.cast.media.timeout.queue).toBe(0);
|
||||
expect(chrome.cast.media.timeout.seek).toBe(0);
|
||||
expect(chrome.cast.media.timeout.setVolume).toBe(0);
|
||||
expect(chrome.cast.media.timeout.stop).toBe(0);
|
||||
})
|
||||
});
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user