Bug 973235 - Intermittent test_mediarecorder_getencodeddata.html | should get onError first. r=jsmith, a=test-only
authorRandy Lin <rlin@mozilla.com>
Mon, 03 Mar 2014 15:34:14 +0800
changeset 183142 a8c6900388bddbfa48266e0a44a41d757d3b4b7b
parent 183141 fbac1671ae4af0dd87df8542ad8aa6694a274a32
child 183143 0a38af7a993cce22581334fd5b3a2b8c4fd2d11c
push id3343
push userffxbld
push dateMon, 17 Mar 2014 21:55:32 +0000
treeherdermozilla-beta@2f7d3415f79f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjsmith, test-only
bugs973235
milestone29.0a2
Bug 973235 - Intermittent test_mediarecorder_getencodeddata.html | should get onError first. r=jsmith, a=test-only
content/media/test/test_mediarecorder_getencodeddata.html
--- a/content/media/test/test_mediarecorder_getencodeddata.html
+++ b/content/media/test/test_mediarecorder_getencodeddata.html
@@ -23,31 +23,27 @@ SpecialPowers.pushPrefEnv({"set": [["med
         is(e.target.state, 'inactive',
            'Media recorder is inactive after being stopped');
         ok(onErrorFired, 'onStop after onError');
         ok(ondataavailableFired, 'ondataavailableFired');
 
         SimpleTest.finish();
       }
       mediaRecorder.ondataavailable = function(evt) {
-        if (onErrorFired) {
-          ondataavailableFired = true;
-          ok(evt instanceof BlobEvent,
-             'Events fired from ondataavailable should be BlobEvent');
-          is(evt.type, 'dataavailable',
-             'Event type should dataavailable');
-          is(evt.data.size, 0,
-             'Blob data size received is equal to zero');
-          is(evt.data.type, expectedMimeType,
-             'Blob data received should have type = ' + expectedMimeType);
-          is(evt.target.mimeType, expectedMimeType,
-             'Mime type in ondataavailable = ' + expectedMimeType);
-        } else {
-          ok(false, 'should get onError first');
-        }
+        ondataavailableFired = true;
+        ok(evt instanceof BlobEvent,
+           'Events fired from ondataavailable should be BlobEvent');
+        is(evt.type, 'dataavailable',
+           'Event type should dataavailable');
+        is(evt.data.size, 0,
+           'Blob data size received is equal to zero');
+        is(evt.data.type, expectedMimeType,
+           'Blob data received should have type = ' + expectedMimeType);
+        is(evt.target.mimeType, expectedMimeType,
+           'Mime type in ondataavailable = ' + expectedMimeType);
       }
       mediaRecorder.onerror = function(evt) {
         ok(evt instanceof RecordErrorEvent,
           'Events fired from onerror should be RecordErrorEvent');
         is(evt.type, 'error',
            'Event type should onerror');
         is(evt.name, 'GenericError',
            'Event name is GenericError');