Bug 1514158 - Update WPT expectations and make tests spec compliant. r=jib,bryce
authorAndreas Pehrson <apehrson@mozilla.com>
Thu, 03 Oct 2019 22:08:49 +0000
changeset 496299 c12cc9f6c9379960bebf70329c9bbca39d7ee043
parent 496298 09d7666761b59659402e4d8958547959e8e3b981
child 496300 f4219cbc29e7aca2b57665d28a45b88b170464cd
push id97160
push userpehrsons@gmail.com
push dateFri, 04 Oct 2019 09:26:59 +0000
treeherderautoland@d7ab956c2962 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjib, bryce
bugs1514158
milestone71.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1514158 - Update WPT expectations and make tests spec compliant. r=jib,bryce Differential Revision: https://phabricator.services.mozilla.com/D33762
testing/web-platform/meta/mediacapture-record/MediaRecorder-creation.https.html.ini
testing/web-platform/meta/mediacapture-record/MediaRecorder-destroy-script-execution.html.ini
testing/web-platform/meta/mediacapture-record/MediaRecorder-error.html.ini
testing/web-platform/meta/mediacapture-record/MediaRecorder-events-and-exceptions.html.ini
testing/web-platform/meta/mediacapture-record/MediaRecorder-stop.html.ini
testing/web-platform/meta/mediacapture-record/idlharness.window.js.ini
testing/web-platform/tests/mediacapture-record/MediaRecorder-creation.https.html
testing/web-platform/tests/mediacapture-record/MediaRecorder-events-and-exceptions.html
deleted file mode 100644
--- a/testing/web-platform/meta/mediacapture-record/MediaRecorder-creation.https.html.ini
+++ /dev/null
@@ -1,10 +0,0 @@
-[MediaRecorder-creation.https.html]
-  [Video+Audio MediaRecorder]
-    expected: FAIL
-
-  [Video-only MediaRecorder]
-    expected: FAIL
-
-  [Audio-only MediaRecorder]
-    expected: FAIL
-
deleted file mode 100644
--- a/testing/web-platform/meta/mediacapture-record/MediaRecorder-destroy-script-execution.html.ini
+++ /dev/null
@@ -1,5 +0,0 @@
-[MediaRecorder-destroy-script-execution.html]
-  expected: TIMEOUT
-  [MediaRecorder will not fire the stop event when all tracks are ended and the script execution context is going away]
-    expected: NOTRUN
-
deleted file mode 100644
--- a/testing/web-platform/meta/mediacapture-record/MediaRecorder-error.html.ini
+++ /dev/null
@@ -1,7 +0,0 @@
-[MediaRecorder-error.html]
-  [MediaRecorder will stop recording when any of track is removed and error event will be fired]
-    expected: FAIL
-
-  [MediaRecorder will stop recording when any of track is added and error event will be fired]
-    expected: FAIL
-
deleted file mode 100644
--- a/testing/web-platform/meta/mediacapture-record/MediaRecorder-events-and-exceptions.html.ini
+++ /dev/null
@@ -1,4 +0,0 @@
-[MediaRecorder-events-and-exceptions.html]
-  [MediaRecorder events and exceptions]
-    expected: FAIL
-
deleted file mode 100644
--- a/testing/web-platform/meta/mediacapture-record/MediaRecorder-stop.html.ini
+++ /dev/null
@@ -1,8 +0,0 @@
-[MediaRecorder-stop.html]
-  expected: TIMEOUT
-  [MediaRecorder will stop recording and fire a stop event when stop() is called]
-    expected: NOTRUN
-
-  [MediaRecorder will stop recording and fire a stop event when all tracks are ended]
-    expected: TIMEOUT
-
--- a/testing/web-platform/meta/mediacapture-record/idlharness.window.js.ini
+++ b/testing/web-platform/meta/mediacapture-record/idlharness.window.js.ini
@@ -1,21 +1,9 @@
 [idlharness.window.html]
-  [MediaRecorder interface: attribute videoBitsPerSecond]
-    expected: FAIL
-
-  [MediaRecorder interface: attribute audioBitsPerSecond]
-    expected: FAIL
-
-  [MediaRecorder interface: [object MediaRecorder\] must inherit property "videoBitsPerSecond" with the proper type]
-    expected: FAIL
-
-  [MediaRecorder interface: [object MediaRecorder\] must inherit property "audioBitsPerSecond" with the proper type]
-    expected: FAIL
-
   [BlobEvent interface object length]
     expected: FAIL
 
   [BlobEvent interface: attribute timecode]
     expected: FAIL
 
   [BlobEvent interface: [object BlobEvent\] must inherit property "timecode" with the proper type]
     expected: FAIL
--- a/testing/web-platform/tests/mediacapture-record/MediaRecorder-creation.https.html
+++ b/testing/web-platform/tests/mediacapture-record/MediaRecorder-creation.https.html
@@ -15,18 +15,18 @@
   function makeAsyncTest(constraints, verifyStream, message) {
     async_test(function(test) {
 
       const gotStream = test.step_func(function(stream) {
         verifyStream(stream);
 
         var recorder = new MediaRecorder(stream);
         assert_equals(recorder.state, "inactive");
-        assert_equals(recorder.videoBitsPerSecond, 0);
-        assert_equals(recorder.audioBitsPerSecond, 0);
+        assert_not_equals(recorder.videoBitsPerSecond, 0);
+        assert_not_equals(recorder.audioBitsPerSecond, 0);
         test.done();
       });
 
       const onError = test.unreached_func('Error creating MediaStream.');
       navigator.mediaDevices.getUserMedia(constraints).then(gotStream, onError);
     }, message);
   }
 
--- a/testing/web-platform/tests/mediacapture-record/MediaRecorder-events-and-exceptions.html
+++ b/testing/web-platform/tests/mediacapture-record/MediaRecorder-events-and-exceptions.html
@@ -31,33 +31,31 @@
 
   async_test(test => {
 
     recorderOnUnexpectedEvent = test.step_func(() => {
       assert_unreached('Unexpected event.');
     });
 
     recorderOnDataAvailable = test.step_func(event => {
-      // TODO(mcasas): ondataavailable might never be pinged with an empty Blob
-      // data on recorder.stop(), see http://crbug.com/54428
       assert_equals(recorder.state, "inactive");
-      assert_equals(event.data.size, 0, 'We should have gotten an empty Blob');
+      assert_not_equals(event.data.size, 0, 'We should get a Blob with data');
     });
 
     recorderOnStop = test.step_func(function() {
       assert_equals(recorder.state, "inactive");
-      assert_throws("InvalidStateError", function() { recorder.stop() },
-                    "recorder cannot be stop()ped in |inactive| state");
+      recorder.onstop = recorderOnUnexpectedEvent;
+      recorder.stop();
+      assert_equals(recorder.state, "inactive", "stop() is idempotent");
       assert_throws("InvalidStateError", function() { recorder.pause() },
                     "recorder cannot be pause()ed in |inactive| state");
       assert_throws("InvalidStateError", function() { recorder.resume() },
                     "recorder cannot be resume()d in |inactive| state");
       assert_throws("InvalidStateError", function() { recorder.requestData() },
                     "cannot requestData() if recorder is in |inactive| state");
-      recorder.onstop = recorderOnUnexpectedEvent;
       test.done();
     });
 
     recorderOnResume = test.step_func(function() {
       assert_equals(recorder.state, "recording");
       recorder.onresume = recorderOnUnexpectedEvent;
       recorder.onstop = recorderOnStop;
       recorder.stop();
@@ -86,18 +84,18 @@
                   function() {
                     recorder =
                         new MediaRecorder(stream, {mimeType : "video/invalid"});
                   },
                   "recorder should throw() with unsupported mimeType");
     let recorder = new MediaRecorder(stream);
     assert_equals(recorder.state, "inactive");
 
-    assert_throws("InvalidStateError", function(){recorder.stop()},
-                  "recorder cannot be stop()ped in |inactive| state");
+    recorder.stop();
+    assert_equals(recorder.state, "inactive", "stop() is idempotent");
     assert_throws("InvalidStateError", function(){recorder.pause()},
                   "recorder cannot be pause()ed in |inactive| state");
     assert_throws("InvalidStateError", function(){recorder.resume()},
                   "recorder cannot be resume()d in |inactive| state");
     assert_throws("InvalidStateError", function(){recorder.requestData()},
                   "cannot requestData() if recorder is in |inactive| state");
 
     drawSomethingOnCanvas();