mirror of
https://github.com/hensm/fx_cast.git
synced 2026-06-08 08:39:59 +00:00
35 lines
1.2 KiB
JavaScript
35 lines
1.2 KiB
JavaScript
"use strict";
|
|
|
|
describe("chrome.cast.media.EditTracksInfoRequest", () => {
|
|
it("should have all properties", async () => {
|
|
const editTracksInfoRequest =
|
|
new chrome.cast.media.EditTracksInfoRequest();
|
|
|
|
expect(editTracksInfoRequest.activeTrackIds).toBe(null);
|
|
expect(editTracksInfoRequest.requestId).toBe(0);
|
|
expect(editTracksInfoRequest.textTrackStyle).toBe(null);
|
|
});
|
|
|
|
it("should have expected assigned properties", async () => {
|
|
const textTrackStyle = new chrome.cast.media.TextTrackStyle();
|
|
textTrackStyle.backgroundColor = "#fefefeff";
|
|
textTrackStyle.fontFamily = "__fontFamily";
|
|
textTrackStyle.windowRoundedCornerRadius = 5;
|
|
|
|
const editTracksInfoRequest =
|
|
new chrome.cast.media.EditTracksInfoRequest(
|
|
[5, 8, 12],
|
|
textTrackStyle
|
|
);
|
|
|
|
expect(editTracksInfoRequest.activeTrackIds).toEqual([5, 8, 12]);
|
|
expect(editTracksInfoRequest.textTrackStyle).toEqual(
|
|
jasmine.objectContaining({
|
|
backgroundColor: "#fefefeff",
|
|
fontFamily: "__fontFamily",
|
|
windowRoundedCornerRadius: 5
|
|
})
|
|
);
|
|
});
|
|
});
|