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

Replace MediaRecorderErrorEvent with a simple ErrorEvent #32380

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions mediacapture-record/MediaRecorder-error.html
Expand Up @@ -14,7 +14,7 @@
const {stream: audio} = createAudioStream(t);
const recorder = new MediaRecorder(video);
recorder.onerror = t.step_func(mediaRecorderErrorEvent => {
assert_true(mediaRecorderErrorEvent instanceof MediaRecorderErrorEvent, 'the type of event should be MediaRecorderErrorEvent');
assert_true(mediaRecorderErrorEvent instanceof ErrorEvent, 'the type of event should be ErrorEvent');
assert_equals(mediaRecorderErrorEvent.error.name, 'InvalidModificationError', 'the type of error should be InvalidModificationError when track has been added or removed');
assert_true(mediaRecorderErrorEvent.isTrusted, 'isTrusted should be true when the event is created by C++');
assert_equals(recorder.state, "inactive", "MediaRecorder has been stopped after adding a track to stream");
Expand All @@ -33,7 +33,7 @@
const {stream: video, control} = createVideoStream(t);
const recorder = new MediaRecorder(video);
recorder.onerror = t.step_func(mediaRecorderErrorEvent => {
assert_true(mediaRecorderErrorEvent instanceof MediaRecorderErrorEvent, 'the type of event should be MediaRecorderErrorEvent');
assert_true(mediaRecorderErrorEvent instanceof ErrorEvent, 'the type of event should be ErrorEvent');
assert_equals(mediaRecorderErrorEvent.error.name, 'InvalidModificationError', 'the type of error should be InvalidModificationError when track has been added or removed');
assert_true(mediaRecorderErrorEvent.isTrusted, 'isTrusted should be true when the event is created by C++');
assert_equals(recorder.state, "inactive", "MediaRecorder has been stopped after removing a track from stream");
Expand Down
7 changes: 0 additions & 7 deletions mediacapture-record/idlharness.window.js
Expand Up @@ -29,12 +29,5 @@ idl_test(
});
} catch(e) {}
idl_array.add_objects({ BlobEvent: [blob] });

try {
error = new MediaRecorderErrorEvent("type", {
error: new DOMException,
});
} catch(e) {}
idl_array.add_objects({ MediaRecorderErrorEvent: [error] });
}
);