Skip to content

Commit

Permalink
Fix two broken integration tests.
Browse files Browse the repository at this point in the history
One was broken by minBufferTime refactors, and the other by MPD retry
policy.

Change-Id: I64d434ae086df36f14834ece92a80cbfce443b9a
  • Loading branch information
joeyparrish committed Apr 17, 2015
1 parent cad2218 commit 1e70b2d
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions spec/player_integration.js
Original file line number Diff line number Diff line change
Expand Up @@ -279,10 +279,10 @@ describe('Player', function() {
// 310 seconds of data. Tweak the buffer time for audio, since this
// will take much less time and bandwidth to buffer.
const minBufferTime = 300;
this.manifestInfo.minBufferTime = minBufferTime;
var sets = this.manifestInfo.periodInfos[0].streamSetInfos;
var audioSet = sets[0].contentType == 'audio' ? sets[0] : sets[1];
expect(audioSet.contentType).toBe('audio');
audioSet.streamInfos[0].minBufferTime = minBufferTime;
// Remove the video set to speed things up.
this.manifestInfo.periodInfos[0].streamSetInfos = [audioSet];
return originalLoad.call(this, preferredLanguage);
Expand Down Expand Up @@ -714,13 +714,12 @@ describe('Player', function() {
player.addEventListener('error', onError, false);

// Ignore any errors in the promise chain.
player.load(newSource(bogusManifest)).catch(function(error) {});

// Expect the error handler to have been called.
delay(0.5).then(function() {
expect(onError.calls.any()).toBe(true);
done();
});
player.load(newSource(bogusManifest)).catch(function(error) {}).then(
function() {
// Expect the error handler to have been called.
expect(onError.calls.any()).toBe(true);
done();
});
});

// TODO(story 1970528): add tests which exercise PSSH parsing,
Expand Down

0 comments on commit 1e70b2d

Please sign in to comment.