mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-23 02:05:42 +00:00
Bug 1547784 - Add crashtest for moving media element with media keys to inactive doc. r=alwu
Differential Revision: https://phabricator.services.mozilla.com/D40481 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
9bd8db2016
commit
07a2753dbb
29
dom/media/test/crashtests/1547784.html
Normal file
29
dom/media/test/crashtests/1547784.html
Normal file
@ -0,0 +1,29 @@
|
||||
<html class="reftest-wait">
|
||||
<head>
|
||||
<script>
|
||||
const doc = new Document();
|
||||
const video = document.createElementNS('http://www.w3.org/1999/xhtml', 'video');
|
||||
const source = new MediaSource();
|
||||
|
||||
navigator.requestMediaKeySystemAccess('org.w3.clearkey', [{ '': [{ '': '' }] }])
|
||||
.then(keySystemAccess => {
|
||||
return keySystemAccess.createMediaKeys();
|
||||
}).then(_ => {
|
||||
video.src = URL.createObjectURL(source);
|
||||
source.addEventListener('sourceopen', () => {
|
||||
doc.adoptNode(video);
|
||||
});
|
||||
});
|
||||
|
||||
navigator.requestMediaKeySystemAccess('org.w3.clearkey', [{ '': [{ '': '' }] }])
|
||||
.then(keySystemAccess => {
|
||||
return keySystemAccess.createMediaKeys();
|
||||
}).then(mediaKeys => {
|
||||
return video.setMediaKeys(mediaKeys);
|
||||
}).then(() => {
|
||||
video.src = URL.createObjectURL(source);
|
||||
document.documentElement.removeAttribute("class");
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
</html>
|
@ -127,4 +127,5 @@ load empty-samples.webm # Bug 1540580
|
||||
test-pref(media.autoplay.block-webaudio,false) load 1545133.html
|
||||
load track-with-zero-dimensions.mp4 # Bug 1542539
|
||||
load 1560215.html
|
||||
load 1547784.html
|
||||
load 1547899.html
|
||||
|
Loading…
Reference in New Issue
Block a user