From e0b947bce495b038c458ca4bb52fdedd33a1a1d0 Mon Sep 17 00:00:00 2001 From: Andrea Marchesini Date: Mon, 3 Apr 2017 10:01:35 +0200 Subject: [PATCH] Bug 1352379 - Add a test for URLSearchParams and record<> CTOR, r=qdot --- dom/url/tests/urlSearchParams_commons.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/dom/url/tests/urlSearchParams_commons.js b/dom/url/tests/urlSearchParams_commons.js index 31edddd1d901..0b8fe39a3406 100644 --- a/dom/url/tests/urlSearchParams_commons.js +++ b/dom/url/tests/urlSearchParams_commons.js @@ -298,5 +298,12 @@ function testCTORs() { } is(result, 43, "CTOR throws if the sequence doesn't contain exactly 2 elements"); + var c = new URLSearchParams({ a: 'b', c: 42, d: null, e: [1,2,3], f: {a:42} }); + is(c.get('a'), 'b', "CTOR with record<>"); + is(c.get('c'), '42', "CTOR with record<>"); + is(c.get('d'), 'null', "CTOR with record<>"); + is(c.get('e'), [1,2,3].toString(), "CTOR with record<>"); + is(c.get('f'), {a:42}.toString(), "CTOR with record<>"); + runTest(); }