[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [tor-browser] 31/73: Bug 1781759 Test cross origin load of media document in parts r=chunmin a=RyanVM
This is an automated email from the git hooks/post-receive script.
richard pushed a commit to branch geckoview-102.3.0esr-12.0-1
in repository tor-browser.
commit 50d697de731208685db0168b9fcef2e7260996fa
Author: Karl Tomlinson <karlt+@xxxxxxxxx>
AuthorDate: Tue Aug 23 00:23:52 2022 +0000
Bug 1781759 Test cross origin load of media document in parts r=chunmin a=RyanVM
Depends on D154040
Differential Revision: https://phabricator.services.mozilla.com/D154041
---
.../read-media/cross-origin-video.html | 32 ++++++++++++++++++++++
.../read-media/resources/iframe-document.sub.html | 5 ++++
2 files changed, 37 insertions(+)
diff --git a/testing/web-platform/tests/html/browsers/browsing-the-web/read-media/cross-origin-video.html b/testing/web-platform/tests/html/browsers/browsing-the-web/read-media/cross-origin-video.html
new file mode 100644
index 0000000000000..b99658facb29b
--- /dev/null
+++ b/testing/web-platform/tests/html/browsers/browsing-the-web/read-media/cross-origin-video.html
@@ -0,0 +1,32 @@
+<!doctype html>
+<title>Test cross origin load of media document in parts</title>
+<link rel="motivation" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1781759">
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="/common/get-host-info.sub.js"></script>
+<body></body>
+<script>
+promise_test(async () => {
+ const frame = document.createElement('iframe');
+ const dir = location.pathname.replace(/\/[^\/]*$/, '/');
+ frame.src =
+ // remote origin intermediate document
+ get_host_info().HTTP_NOTSAMESITE_ORIGIN + dir
+ // iframe-document.sub.html has an iframe with src=childsrc.
+ + 'resources/iframe-document.sub.html?childsrc='
+ // same origin video document, so that we can play().
+ + get_host_info().ORIGIN
+ // 'PartialContent' ensures that the entire video resource does not load
+ // in one fetch.
+ + '/service-workers/service-worker/resources/fetch-access-control.py?'
+ + 'VIDEO%26PartialContent';
+
+ document.body.appendChild(frame);
+ await new Promise(resolve => frame.onload = resolve);
+
+ const inner = frame.contentWindow.frames[0];
+ const video = inner.document.body.childNodes[0];
+ video.muted = true; // to allow playback
+ return video.play();
+});
+</script>
diff --git a/testing/web-platform/tests/html/browsers/browsing-the-web/read-media/resources/iframe-document.sub.html b/testing/web-platform/tests/html/browsers/browsing-the-web/read-media/resources/iframe-document.sub.html
new file mode 100644
index 0000000000000..69523efa7abc7
--- /dev/null
+++ b/testing/web-platform/tests/html/browsers/browsing-the-web/read-media/resources/iframe-document.sub.html
@@ -0,0 +1,5 @@
+<!doctype html>
+<html>
+<iframe src="{{GET[childsrc]}}">
+</iframe>
+</html>
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits