| <title>mock-media-source</title> |
| <script src="mock-media-source.js"></script> |
| <script src="../video-test.js"></script> |
| internals.initializeMockMediaSource(); |
| source = new MediaSource(); |
| testDOMException('source.addSourceBuffer("invalid")', 'DOMException.NOT_SUPPORTED_ERR'); |
| testExpected('MediaSource.isTypeSupported("invalid")', false); |
| testExpected('MediaSource.isTypeSupported("video/mock; codecs=mock")', true); |
| waitForEvent('sourceopen', sourceOpen, false, false, source); |
| run('video.src = URL.createObjectURL(source)'); |
| run('sourceBuffer = source.addSourceBuffer("video/mock; codecs=mock")'); |
| testExpected('source.sourceBuffers[0]', sourceBuffer); |
| <body onload="runTest()"> |