зеркало из https://github.com/mozilla/gecko-dev.git
bug 1116382 adjust explict revoke test to fail if revocation fails r=bholley
Previously this test would pass even without the revokeObjectURL(). --HG-- extra : rebase_source : 7b5ab56b40350db7830395e3d5f70b3e161302fb
This commit is contained in:
Родитель
d195016f96
Коммит
80c5b6f51b
|
@ -9,13 +9,20 @@
|
|||
<body>
|
||||
<div id="log"></div>
|
||||
<script>
|
||||
var video = document.createElement('video');
|
||||
test(function() {
|
||||
async_test(function(t) {
|
||||
var mediaSource = new MediaSource();
|
||||
var url = window.URL.createObjectURL(mediaSource);
|
||||
window.URL.revokeObjectURL(url);
|
||||
mediaSource.addEventListener('sourceopen',
|
||||
t.unreached_func("url should not reference MediaSource."));
|
||||
var video = document.createElement('video');
|
||||
video.src = url;
|
||||
assert_equals(mediaSource.readyState, 'closed');
|
||||
video.addEventListener('error', t.step_func_done(function(e) {
|
||||
assert_equals(e.target.error.code,
|
||||
MediaError.MEDIA_ERR_SRC_NOT_SUPPORTED,
|
||||
'Expected error code');
|
||||
assert_equals(mediaSource.readyState, 'closed');
|
||||
}));
|
||||
}, "Check revoking behavior of URL.revokeObjectURL(url).");
|
||||
</script>
|
||||
</body>
|
||||
|
|
Загрузка…
Ссылка в новой задаче