Skip to content

Commit

Permalink
Backed out changeset 19d4e98a1191 (bug 1295352) for frequently failin…
Browse files Browse the repository at this point in the history
…g mda test test_getUserMedia_trackEnded.html on Linux x64 debug. r=backout a=backout
  • Loading branch information
Archaeopteryx committed Oct 20, 2016
1 parent c87ccae commit 6631230
Showing 1 changed file with 0 additions and 17 deletions.
17 changes: 0 additions & 17 deletions dom/media/tests/mochitest/mediaStreamPlayback.js
Original file line number Diff line number Diff line change
Expand Up @@ -254,23 +254,6 @@ function createHTML(options) {
return scriptsReady.then(() => realCreateHTML(options));
}

var pushPrefs = (...p) => new Promise(r => SpecialPowers.pushPrefEnv({set: p}, r));

// noGum - Helper to detect whether active guM tracks still exist.
//
// It relies on the fact that, by spec, device labels from enumerateDevices are
// only visible during active gum calls. They're also visible when persistent
// permissions are granted, so turn off media.navigator.permission.disabled
// (which is normally on otherwise in our tests). Lastly, we must turn on
// media.navigator.permission.fake otherwise fake devices don't count as active.

var noGum = () => pushPrefs(["media.navigator.permission.disabled", false],
["media.navigator.permission.fake", true])
.then(() => navigator.mediaDevices.enumerateDevices())
.then(([device]) => device &&
is(device.label, "", "Test must leave no active gUM streams behind."));

var runTest = testFunction => scriptsReady
.then(() => runTestWhenReady(testFunction))
.then(() => noGum())
.then(() => finish());

0 comments on commit 6631230

Please sign in to comment.