('InvalidStateError',
                  function() { sourceBuffer.mode = 'segments'; },
                  'Setting valid sourceBuffer.mode on updating SourceBuffer threw InvalidStateError.');
              test.done();
          }, 'Test setting SourceBuffer.mode while still updating');

          mediasource_testafterdataloaded(function(test, mediaElement, mediaSource, segmentInfo, sourceBuffer, mediaData)
          {
              test.expectEvent(sourceBuffer, 'updateend', 'Append ended.');
             