Bug 973235 - Intermittent test_mediarecorder_getencodeddata.html | should get onError first. r=jsmith
authorRandy Lin <rlin@mozilla.com>
Mon, 03 Mar 2014 15:34:14 +0800
changeset 188743 350d43769841829183d79458336ed577c9eb5350
parent 188742 0ed4786b22de571502f054b6156c6cb669f09a61
child 188744 39fd1f27b8f5805a50070224d4fc31badc573c7d
push id3503
push userraliiev@mozilla.com
push dateMon, 28 Apr 2014 18:51:11 +0000
treeherdermozilla-beta@c95ac01e332e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjsmith
bugs973235
milestone30.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 973235 - Intermittent test_mediarecorder_getencodeddata.html | should get onError first. r=jsmith
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');