summaryrefslogtreecommitdiffstats
path: root/js/xpconnect/tests/unit/test_URLSearchParams.js
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--js/xpconnect/tests/unit/test_URLSearchParams.js12
1 files changed, 12 insertions, 0 deletions
diff --git a/js/xpconnect/tests/unit/test_URLSearchParams.js b/js/xpconnect/tests/unit/test_URLSearchParams.js
new file mode 100644
index 0000000000..fb2d203187
--- /dev/null
+++ b/js/xpconnect/tests/unit/test_URLSearchParams.js
@@ -0,0 +1,12 @@
+/* Any copyright is dedicated to the Public Domain.
+ * http://creativecommons.org/publicdomain/zero/1.0/ */
+
+function run_test() {
+ var sb = new Cu.Sandbox('http://www.example.com',
+ { wantGlobalProperties: ["URLSearchParams"] });
+ sb.equal = equal;
+ Cu.evalInSandbox('equal(new URLSearchParams("one=1&two=2").get("one"), "1");',
+ sb);
+ Cu.importGlobalProperties(["URLSearchParams"]);
+ Assert.equal(new URLSearchParams("one=1&two=2").get("one"), "1");
+}