Skip to content

Commit

Permalink
Use utility for loading shaka library in external asset tests
Browse files Browse the repository at this point in the history
We already had this utility, but we did'nt use it here for some reason.

Change-Id: Ib225c7b3f8f0470663ba8d3dd3ba9543af74abd2
  • Loading branch information
joeyparrish committed Jan 6, 2020
1 parent ee91f4a commit 6da39f5
Showing 1 changed file with 1 addition and 17 deletions.
18 changes: 1 addition & 17 deletions test/player_external.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,23 +26,7 @@ describe('Player', () => {
beforeAll(async () => {
video = shaka.test.UiUtils.createVideoElement();
document.body.appendChild(video);

/** @type {!shaka.util.PublicPromise} */
const loaded = new shaka.util.PublicPromise();
if (getClientArg('uncompiled')) {
// For debugging purposes, use the uncompiled library.
compiledShaka = shaka;
loaded.resolve();
} else {
// Load the compiled library as a module.
// All tests in this suite will use the compiled library.
require(['/base/dist/shaka-player.ui.js'], (shakaModule) => {
compiledShaka = shakaModule;
loaded.resolve();
});
}

await loaded;
compiledShaka = await Util.loadShaka(getClientArg('uncompiled'));
support = await compiledShaka.Player.probeSupport();
});

Expand Down

0 comments on commit 6da39f5

Please sign in to comment.