Skip to content
This repository was archived by the owner on Mar 19, 2021. It is now read-only.

Commit 0cb592b

Browse files
Pehrsonsmoz-wptsync-bot
authored andcommitted
Update WPT expectations and make tests spec compliant.
Differential Revision: https://phabricator.services.mozilla.com/D33762 bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1514158 gecko-commit: c12cc9f6c9379960bebf70329c9bbca39d7ee043 gecko-integration-branch: autoland gecko-reviewers: jib, bryce
1 parent bd4d9b6 commit 0cb592b

File tree

2 files changed

+8
-10
lines changed

2 files changed

+8
-10
lines changed

mediacapture-record/MediaRecorder-creation.https.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@
2020

2121
var recorder = new MediaRecorder(stream);
2222
assert_equals(recorder.state, "inactive");
23-
assert_equals(recorder.videoBitsPerSecond, 0);
24-
assert_equals(recorder.audioBitsPerSecond, 0);
23+
assert_not_equals(recorder.videoBitsPerSecond, 0);
24+
assert_not_equals(recorder.audioBitsPerSecond, 0);
2525
test.done();
2626
});
2727

mediacapture-record/MediaRecorder-events-and-exceptions.html

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -36,23 +36,21 @@
3636
});
3737

3838
recorderOnDataAvailable = test.step_func(event => {
39-
// TODO(mcasas): ondataavailable might never be pinged with an empty Blob
40-
// data on recorder.stop(), see http://crbug.com/54428
4139
assert_equals(recorder.state, "inactive");
42-
assert_equals(event.data.size, 0, 'We should have gotten an empty Blob');
40+
assert_not_equals(event.data.size, 0, 'We should get a Blob with data');
4341
});
4442

4543
recorderOnStop = test.step_func(function() {
4644
assert_equals(recorder.state, "inactive");
47-
assert_throws("InvalidStateError", function() { recorder.stop() },
48-
"recorder cannot be stop()ped in |inactive| state");
45+
recorder.onstop = recorderOnUnexpectedEvent;
46+
recorder.stop();
47+
assert_equals(recorder.state, "inactive", "stop() is idempotent");
4948
assert_throws("InvalidStateError", function() { recorder.pause() },
5049
"recorder cannot be pause()ed in |inactive| state");
5150
assert_throws("InvalidStateError", function() { recorder.resume() },
5251
"recorder cannot be resume()d in |inactive| state");
5352
assert_throws("InvalidStateError", function() { recorder.requestData() },
5453
"cannot requestData() if recorder is in |inactive| state");
55-
recorder.onstop = recorderOnUnexpectedEvent;
5654
test.done();
5755
});
5856

@@ -91,8 +89,8 @@
9189
let recorder = new MediaRecorder(stream);
9290
assert_equals(recorder.state, "inactive");
9391

94-
assert_throws("InvalidStateError", function(){recorder.stop()},
95-
"recorder cannot be stop()ped in |inactive| state");
92+
recorder.stop();
93+
assert_equals(recorder.state, "inactive", "stop() is idempotent");
9694
assert_throws("InvalidStateError", function(){recorder.pause()},
9795
"recorder cannot be pause()ed in |inactive| state");
9896
assert_throws("InvalidStateError", function(){recorder.resume()},

0 commit comments

Comments
 (0)