      sourceBuffer.mode = 'segments';
              assert_equals(sourceBuffer.mode, 'segments', 'mode after setting it to \'segments\'');
              test.done();
          }, 'Test setting SourceBuffer.mode');

          mediasource_testafterdataloaded(function(test, mediaElement, mediaSource, segmentInfo, sourceBuffer, mediaData)
          {
              mediaSource.removeSourceBuffer(sourceBuffer);
              assert_throws_dom('InvalidStateError',
                  function() { sourceBuffer.mode =