Auto merge of #23103 - ferjm:srcObject, r=Manishearth

Implement srcObject logic for Blob media providers

- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [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/23103)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2019-04-03 05:05:32 -04:00 committed by GitHub
commit b9b729caa0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 115 additions and 14 deletions

View file

@ -0,0 +1,31 @@
<!doctype html>
<meta charset="utf-8">
<title>HTMLMediaElement.srcObject blob</title>
<script src='/common/media.js'></script>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<video></video>
<script>
async_test(function(t) {
t.step(function() {
fetch(getVideoURI('/media/movie_5'))
.then(function(response) {
return response.blob();
})
.then(function(blob) {
let video = document.querySelector("video");
video.srcObject = blob;
video.addEventListener('ended', function() {
t.done();
});
video.play().catch(function(error) {
assert(false, error);
});
})
.catch(function(error) {
assert(false, error);
});
});
});
</script>