Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MSE-in-Workers: Relaunch with flag guards and handle visibility restricted #36117

Merged
merged 1 commit into from
Oct 1, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions media-source/dedicated-worker/mediasource-worker-handle.html
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,17 @@
}, "Test main context receipt of postMessage'd MediaSourceHandle from DedicatedWorker MediaSource");

test(t => {
assert_true(window.hasOwnProperty("MediaSourceHandle"), "window must have MediaSourceHandle visibility");
assert_true(window.hasOwnProperty("MediaSourceHandle"), "window must have MediaSourceHandle");
}, "Test main-thread has MediaSourceHandle defined");

test(t => {
// Note, MSE spec may eventually describe how a main-thread MediaSource can
// attach to an HTMLMediaElement using a MediaSourceHandle. For now, we
// ensure that the implementation of this is not available.
assert_throws_dom('NotSupportedError', function() {
let h = new MediaSource().handle;
}, 'main thread MediaSource instance cannot (yet) create a usable MediaSourceHandle');
}, "Test main-thread-owned MediaSource instance cannot create a MediaSourceHandle");
// ensure that the implementation of this is not available per current spec.
assert_false(
"handle" in MediaSource.prototype,
"window MediaSource must not have handle in prototype");
}, "Test main-thread MediaSource does not have handle getter");

if (MediaSource.hasOwnProperty("canConstructInDedicatedWorker") && MediaSource.canConstructInDedicatedWorker === true) {
// If implementation claims support for MSE-in-Workers, then fetch and run
Expand Down