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:
Karl Tomlinson 2015-05-28 23:36:31 +12:00
Родитель d195016f96
Коммит 80c5b6f51b
1 изменённых файлов: 10 добавлений и 3 удалений

Просмотреть файл

@ -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>