From 8ba5de483c37190f5d7fd080f4a35d1ba0351114 Mon Sep 17 00:00:00 2001 From: Martin Thomson Date: Mon, 5 Oct 2015 13:07:33 -0700 Subject: [PATCH] Bug 1209744 - Switch to setIdentityProvider for js-implemented bindings test, r=jib --HG-- extra : transplant_source : %05%2C%E2%F4%89O%18%22r%29Q%22%3E%171%A6%FCMy%C9 --- dom/bindings/test/mochitest.ini | 1 + .../test_exceptions_from_jsimplemented.html | 28 +++++++++---------- 2 files changed, 14 insertions(+), 15 deletions(-) diff --git a/dom/bindings/test/mochitest.ini b/dom/bindings/test/mochitest.ini index 11285070d318..2f6b42d39c98 100644 --- a/dom/bindings/test/mochitest.ini +++ b/dom/bindings/test/mochitest.ini @@ -39,6 +39,7 @@ skip-if = debug == false [test_interfaceToString.html] [test_exceptions_from_jsimplemented.html] skip-if = (toolkit == 'gonk' && debug) #debug-only failure; bug 926547 +tags = webrtc [test_lenientThis.html] [test_lookupGetter.html] [test_namedNoIndexed.html] diff --git a/dom/bindings/test/test_exceptions_from_jsimplemented.html b/dom/bindings/test/test_exceptions_from_jsimplemented.html index b893e12c27d8..d0f599353aaf 100644 --- a/dom/bindings/test/test_exceptions_from_jsimplemented.html +++ b/dom/bindings/test/test_exceptions_from_jsimplemented.html @@ -12,27 +12,13 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=923010 /** Test for Bug 923010 **/ try { var conn = new RTCPeerConnection(); - try { - conn.updateIce(candidate, function() { - ok(false, "The call to updateIce succeeded when it should have thrown"); - }, function() { - ok(false, "The call to updateIce failed when it should have thrown"); - }) - ok(false, "That call to updateIce should have thrown"); - } catch (e) { - is(e.lineNumber, 16, "Exception should have been on line 16"); - is(e.message, - "updateIce not yet implemented", - "Should have the exception we expect"); - } var candidate = new RTCIceCandidate({candidate: null }); - conn.addIceCandidate(candidate) .then(function() { ok(false, "addIceCandidate succeeded when it should have failed"); }, function(reason) { - is(reason.lineNumber, 31, "Rejection should have been on line 31"); + is(reason.lineNumber, 17, "Rejection should have been on line 17"); is(reason.message, "Invalid candidate passed to addIceCandidate!", "Should have the rejection we expect"); @@ -44,6 +30,18 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=923010 // b2g has no WebRTC, apparently todo(false, "No WebRTC on b2g yet"); } + + conn.close(); + try { + conn.setIdentityProvider("example.com", "foo"); + ok(false, "That call to setIdentityProvider should have thrown"); + } catch (e) { + is(e.lineNumber, 36, "Exception should have been on line 36"); + is(e.message, + "Peer connection is closed", + "Should have the exception we expect"); + } +