Auto merge of #22944 - ferjm:player.shutdown, r=ceyusa

Shutdown player when HTMLMediaElement is dropped

- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #22931
- [X] There are tests for these changes

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/22944)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2019-03-25 07:47:06 -04:00 committed by GitHub
commit 5ae562bfc3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 372 additions and 261 deletions

View file

@ -1,5 +1,11 @@
{
"items": {
"conformancechecker": {
"mozilla/remove_video_iframe.html": []
},
"manual": {
"mozilla/remove_video_iframe.html": []
},
"reftest": {
"css/abs-overflow-stackingcontext.html": [
[
@ -7325,6 +7331,7 @@
{}
]
],
"mozilla/remove_video_iframe.html": [],
"mozilla/reparse_style_elements.html": [
[
"mozilla/reparse_style_elements.html",
@ -7626,7 +7633,11 @@
],
{}
]
]
],
"mozilla/remove_video_iframe.html": []
},
"stub": {
"mozilla/remove_video_iframe.html": []
},
"support": {
".gitignore": [
@ -10864,6 +10875,7 @@
{}
]
],
"mozilla/remove_video_iframe.html": [],
"mozilla/reparse_style_elements_ref.html": [
[
{}
@ -10939,6 +10951,11 @@
{}
]
],
"mozilla/resources/remove_video_iframe_inner.html": [
[
{}
]
],
"mozilla/resources/second.html": [
[
{}
@ -10949,6 +10966,11 @@
{}
]
],
"mozilla/resources/video.mp4": [
[
{}
]
],
"mozilla/resources/worker_success.js": [
[
{}
@ -13550,6 +13572,12 @@
{}
]
],
"mozilla/remove_video_iframe.html": [
[
"/_mozilla/mozilla/remove_video_iframe.html",
{}
]
],
"mozilla/response-data-brotli.htm": [
[
"mozilla/response-data-brotli.htm",
@ -13862,6 +13890,12 @@
{}
]
]
},
"visual": {
"mozilla/remove_video_iframe.html": []
},
"wdspec": {
"mozilla/remove_video_iframe.html": []
}
},
"paths": {
@ -20461,6 +20495,10 @@
"d562e12720350501ad14223b668131837fd10620",
"support"
],
"mozilla/remove_video_iframe.html": [
"67b28d100828334ba96736d5fb2bcf01ed554d68",
"testharness"
],
"mozilla/reparse_style_elements.html": [
"e54f5a28d131ab41f89d3d70a9d01ea2fae751c1",
"reftest"
@ -20529,6 +20567,10 @@
"b0883f382e1a80609b7b2c7904e701fbe6760b14",
"support"
],
"mozilla/resources/remove_video_iframe_inner.html": [
"bdd3d9349af8ade8bb4dcec1d7d46256ee2cffa1",
"support"
],
"mozilla/resources/second.html": [
"c4fbe534ed193e1d192c0338997a8d9da8eb6406",
"support"
@ -20537,6 +20579,10 @@
"8faa57c0c47c4fdf27c052d059b28ee1088235e9",
"support"
],
"mozilla/resources/video.mp4": [
"fb5dbca23808bee44003692cb0e139dd6a22e874",
"support"
],
"mozilla/resources/worker_success.js": [
"327986f34b9b20476b6a7b1189c732a9ea8b9f68",
"support"

View file

@ -0,0 +1,14 @@
<!doctype html>
<meta charset="utf-8">
<title>Removing an iframe loading a video should not panic</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<iframe id="video" src="resources/remove_video_iframe_inner.html"></iframe>
<script>
async_test(function(t) {
setTimeout(function() {
document.getElementById('video').remove();
t.done();
}, 1000);
});
</script>

View file

@ -0,0 +1 @@
<video autoplay src="video.mp4"></video>

Binary file not shown.