mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1116355 - Throw when setting SourceBuffer mode to 'sequence'. r=karlt,rs=Ms2ger
This commit is contained in:
parent
8c483075ea
commit
cbe75bc86d
@ -49,6 +49,10 @@ SourceBuffer::SetMode(SourceBufferAppendMode aMode, ErrorResult& aRv)
|
|||||||
aRv.Throw(NS_ERROR_DOM_INVALID_STATE_ERR);
|
aRv.Throw(NS_ERROR_DOM_INVALID_STATE_ERR);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (aMode == SourceBufferAppendMode::Sequence) {
|
||||||
|
aRv.Throw(NS_ERROR_DOM_NOT_SUPPORTED_ERR);
|
||||||
|
return;
|
||||||
|
}
|
||||||
MOZ_ASSERT(mMediaSource->ReadyState() != MediaSourceReadyState::Closed);
|
MOZ_ASSERT(mMediaSource->ReadyState() != MediaSourceReadyState::Closed);
|
||||||
if (mMediaSource->ReadyState() == MediaSourceReadyState::Ended) {
|
if (mMediaSource->ReadyState() == MediaSourceReadyState::Ended) {
|
||||||
mMediaSource->SetReadyState(MediaSourceReadyState::Open);
|
mMediaSource->SetReadyState(MediaSourceReadyState::Open);
|
||||||
|
@ -19,6 +19,7 @@ skip-if = (toolkit == 'android' || buildapp == 'mulet') #timeout android/mulet o
|
|||||||
[test_SeekableAfterEndOfStreamSplit.html]
|
[test_SeekableAfterEndOfStreamSplit.html]
|
||||||
[test_SeekableBeforeEndOfStream.html]
|
[test_SeekableBeforeEndOfStream.html]
|
||||||
[test_SeekableBeforeEndOfStreamSplit.html]
|
[test_SeekableBeforeEndOfStreamSplit.html]
|
||||||
|
[test_SetModeThrows.html]
|
||||||
[test_SplitAppendDelay.html]
|
[test_SplitAppendDelay.html]
|
||||||
[test_SplitAppend.html]
|
[test_SplitAppend.html]
|
||||||
[test_WaitingOnMissingData.html]
|
[test_WaitingOnMissingData.html]
|
||||||
|
34
dom/media/mediasource/test/test_SetModeThrows.html
Normal file
34
dom/media/mediasource/test/test_SetModeThrows.html
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
<!DOCTYPE HTML>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>MSE: append initialization only</title>
|
||||||
|
<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||||
|
<script type="text/javascript" src="mediasource.js"></script>
|
||||||
|
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<pre id="test">
|
||||||
|
<script class="testbody" type="text/javascript">
|
||||||
|
|
||||||
|
SimpleTest.waitForExplicitFinish();
|
||||||
|
|
||||||
|
// This test should be removed when we implement sequence mode in bug 1116353
|
||||||
|
runWithMSE(function (ms, v) {
|
||||||
|
ms.addEventListener("sourceopen", function () {
|
||||||
|
var sb = ms.addSourceBuffer("video/webm");
|
||||||
|
|
||||||
|
sb.mode = "segments";
|
||||||
|
ok("true", "Setting to segments does not throw");
|
||||||
|
try {
|
||||||
|
sb.mode = "sequence";
|
||||||
|
ok(false, "Should have thrown");
|
||||||
|
} catch (e) { ok(/supported/.test(e), "Correctly threw not supported: " + e); }
|
||||||
|
|
||||||
|
SimpleTest.finish();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
</script>
|
||||||
|
</pre>
|
||||||
|
</body>
|
||||||
|
</html>
|
@ -2,4 +2,6 @@
|
|||||||
type: testharness
|
type: testharness
|
||||||
[Test setting SourceBuffer.mode and SourceBuffer.timestampOffset while parsing media segment.]
|
[Test setting SourceBuffer.mode and SourceBuffer.timestampOffset while parsing media segment.]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
[Test setting SourceBuffer.mode]
|
||||||
|
expected: FAIL # Not supported yet - see bug 1116353
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user