async function testInterruptAfter(state) {
      createPlayer();

      let pendingUnload;
      whenEnteringState(state, () => {
        pendingUnload = player.unload(/* initMediaSource= */ false);
      });

      // We attach manually so that we had time to override the state change
      // spy's action.
      await player.attach(video);
      await expectAsync(player.load('test:sintel')).toBeRejected();

      // By the time that |player.load| failed, we should have started
      // |player.unload|.
      expect(pendingUnload).toBeTruthy();
      await pendingUnload;
    }
Given the name of a state, tell the player to load content but unload
when it reaches |state|. The load should be interrupted and the player
should return to the unloaded state.

@param {string} state
@return {!Promise}