Bug 1502766 - Part 0: Re-enable test for "relay" ICE policy. r=jib, a=RyanVM
authorByron Campen [:bwc] <docfaraday@gmail.com>
Mon, 29 Oct 2018 11:12:23 -0500
changeset 500980 88adf850f1d275f5023332b7f962aa7395c4c366
parent 500979 1ca9702a4960ee586097472bb2d4aaf10e3eed99
child 500981 e062a0236c8e7167bcb1b7f72e7c867f98a49dc3
push id1864
push userffxbld-merge
push dateMon, 03 Dec 2018 15:51:40 +0000
treeherdermozilla-release@f040763d99ad [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjib, RyanVM
bugs1502766
milestone64.0
Bug 1502766 - Part 0: Re-enable test for "relay" ICE policy. r=jib, a=RyanVM
dom/media/tests/mochitest/mochitest.ini
dom/media/tests/mochitest/pc.js
dom/media/tests/mochitest/test_peerConnection_relayOnly.html
--- a/dom/media/tests/mochitest/mochitest.ini
+++ b/dom/media/tests/mochitest/mochitest.ini
@@ -241,17 +241,17 @@ skip-if = toolkit == 'android'
 skip-if = (android_version == '18') # android(Bug 1189784, timeouts on 4.3 emulator)
 [test_peerConnection_simulcastOffer.html]
 skip-if = android_version # no simulcast support on android
 [test_peerConnection_simulcastAnswer.html]
 skip-if = android_version # no simulcast support on android
 [test_peerConnection_simulcastOddResolution.html]
 skip-if = android_version # no simulcast support on android
 [test_peerConnection_relayOnly.html]
-disabled=
+skip-if = toolkit == 'android' # android(Bug 1189784, timeouts on 4.3 emulator)
 [test_peerConnection_callbacks.html]
 skip-if = toolkit == 'android' # android(Bug 1189784, timeouts on 4.3 emulator)
 [test_peerConnection_replaceTrack.html]
 skip-if = toolkit == 'android'  # Bug 1189784
 [test_peerConnection_syncSetDescription.html]
 skip-if = android_version == '18' # android(Bug 1189784, timeouts on 4.3 emulator)
 [test_peerConnection_setLocalAnswerInHaveLocalOffer.html]
 [test_peerConnection_setLocalAnswerInStable.html]
--- a/dom/media/tests/mochitest/pc.js
+++ b/dom/media/tests/mochitest/pc.js
@@ -794,17 +794,17 @@ function PeerConnectionWrapper(label, co
     var iceState = this._pc.iceConnectionState;
     info(this + ": oniceconnectionstatechange fired, new state is: " + iceState);
     Object.keys(this.ice_connection_callbacks).forEach(name => {
       this.ice_connection_callbacks[name]();
     });
     if (iceState === "connected") {
       this.iceConnectedResolve();
     } else if (iceState === "failed") {
-      this.iceConnectedReject();
+      this.iceConnectedReject(new Error("ICE failed"));
     }
   };
 
   this._pc.onicegatheringstatechange = e => {
     isnot(typeof this._pc.iceGatheringState, "undefined",
           "iceGetheringState should not be undefined");
     var gatheringState = this._pc.iceGatheringState;
     info(this + ": onicegatheringstatechange fired, new state is: " + gatheringState);
--- a/dom/media/tests/mochitest/test_peerConnection_relayOnly.html
+++ b/dom/media/tests/mochitest/test_peerConnection_relayOnly.html
@@ -17,18 +17,18 @@ function PC_LOCAL_NO_CANDIDATES(test) {
 }
 
 function PC_BOTH_WAIT_FOR_ICE_FAILED(test) {
   var isFail = (f, reason, msg) =>
     f().then(() => { throw new Error(msg + " must fail"); },
              e => is(e.message, reason, msg + " must fail with: " + e.message));
 
   return Promise.all([
-    isFail(() => waitForIceConnected(test, test.pcLocal), "ICE failed", "Local ICE"),
-    isFail(() => waitForIceConnected(test, test.pcRemote), "ICE failed", "Remote ICE")
+    isFail(() => test.pcLocal.waitForIceConnected(), "ICE failed", "Local ICE"),
+    isFail(() => test.pcRemote.waitForIceConnected(), "ICE failed", "Remote ICE")
   ])
   .then(() => ok(true, "ICE on both sides must fail."));
 }
 
 var test;
 
 runNetworkTest(options =>
     pushPrefs(['media.peerconnection.ice.stun_client_maximum_transmits', 3],