DXR will be turned off on Tuesday, December 29th. It will redirect to Searchfox.
See the announcement on Discourse.

DXR is a code search and navigation tool aimed at making sense of large projects. It supports full-text and regex searches as well as structural queries.

Mercurial (c68fe15a81fc)

VCS Links

Line Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56
<!DOCTYPE HTML>
<html>
<head>
  <title>Bug 1395022 - MediaRecorder fires start event when erroring.</title>
  <title>Bug 1395022 - MediaRecorder fires start event when erroring.</title>
  <script src="/tests/SimpleTest/SimpleTest.js"></script>
  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
</head>
<body>

<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1395022">Mozilla Bug 1395022</a>
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1395022">Mozilla Bug 1395022</a>
<pre id="test">
<script class="testbody" type="text/javascript">
function startTest() {
  let audioContext = new AudioContext();
  let destination1 = audioContext.createMediaStreamDestination();
  let destination1 = audioContext.createMediaStreamDestination();
  let oscilator = audioContext.createOscillator();
  oscilator.connect(destination1);
  oscilator.start();

  let destination2 = audioContext.createMediaStreamDestination();
  let destination2 = audioContext.createMediaStreamDestination();

  let rec = new MediaRecorder(destination1.stream);

  let numStartEvents = 0;


  rec.onstart = () => {
    numStartEvents += 1;
    is(numStartEvents, 1, "One start event should be fired by the recorder");
    // Trigger an error in the recorder
    destination1.stream.addTrack(destination2.stream.getTracks()[0]);
    destination1.stream.addTrack(destination2.stream.getTracks()[0]);
  };

  rec.onerror = () => {
  rec.onerror = () => {
    is(numStartEvents, 1, "One start event should have been fired by the recorder");
    is(numStartEvents, 1, "One start event should have been fired by the recorder");
    SimpleTest.finish();
  };


  rec.start();
}

SimpleTest.waitForExplicitFinish();
startTest();
startTest();

</script>
</head>
</html></html>