summaryrefslogtreecommitdiffstats
path: root/dom/media/webrtc/tests/mochitests/test_1717318.html
diff options
context:
space:
mode:
Diffstat (limited to 'dom/media/webrtc/tests/mochitests/test_1717318.html')
-rw-r--r--dom/media/webrtc/tests/mochitests/test_1717318.html26
1 files changed, 26 insertions, 0 deletions
diff --git a/dom/media/webrtc/tests/mochitests/test_1717318.html b/dom/media/webrtc/tests/mochitests/test_1717318.html
new file mode 100644
index 0000000000..425bd29e7e
--- /dev/null
+++ b/dom/media/webrtc/tests/mochitests/test_1717318.html
@@ -0,0 +1,26 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+ <title>PC construct with no global object (bug 1717318)</title>
+ <script type="text/javascript" src="/MochiKit/MochiKit.js"></script>
+ <script src="/tests/SimpleTest/SimpleTest.js"></script>
+ <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
+</head>
+<body>
+<script class="testbody" type="text/javascript">
+"use strict";
+
+// nsIArray is not special here, it could be pretty much any interface.
+// We do this outside the try block just in case someday the interface is
+// removed.
+const dummyInterface = SpecialPowers.Components.interfaces.nsIArray;
+ok(dummyInterface, "nsIArray should exist");
+try {
+ // Just don't crash.
+ SpecialPowers.Components.classes["@mozilla.org/peerconnection;1"]
+ .createInstance(dummyInterface);
+} catch (e) {}
+
+</script>
+</body>
+</html>