Skip to content

Commit

Permalink
Fix usage of Storage API in tests
Browse files Browse the repository at this point in the history
We recently updated the Storage API to return AbortableOperation
instead of Promise.  These tests did not get updated at that time.
The runtime backward compatibility kept the tests from failing.

This was caught by a compiler upgrade.

Issue shaka-project#2528

Change-Id: I05f75a5e4443b111c63d7969950777db78133626
  • Loading branch information
joeyparrish committed Apr 29, 2020
1 parent 0395b37 commit df213d8
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions test/offline/offline_integration.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ filterDescribe('Offline', supportsStorage, () => {
});

it('stores, plays, and deletes clear content', async () => {
const content = await storage.store('test:sintel');
const content = await storage.store('test:sintel').promise;
expect(content).toBeTruthy();

const contentUri = content.offlineUri;
Expand Down Expand Up @@ -83,7 +83,7 @@ filterDescribe('Offline', supportsStorage, () => {
shaka.test.TestScheme.setupPlayer(player, 'sintel-enc');

storage.configure('offline.usePersistentLicense', true);
const content = await storage.store('test:sintel-enc');
const content = await storage.store('test:sintel-enc').promise;

// Work around http://crbug.com/887535 in which load cannot happen right
// after close. Experimentally, we seem to need a ~1s delay, so we're
Expand Down Expand Up @@ -122,7 +122,8 @@ filterDescribe('Offline', supportsStorage, () => {
shaka.test.TestScheme.setupPlayer(player, 'multidrm_no_init_data');

storage.configure('offline.usePersistentLicense', false);
const content = await storage.store('test:multidrm_no_init_data');
const content =
await storage.store('test:multidrm_no_init_data').promise;

const contentUri = content.offlineUri;
goog.asserts.assert(
Expand Down

0 comments on commit df213d8

Please sign in to comment.