Skip to content
Snippets Groups Projects
Commit d78d6963 authored by Andrea Marchesini's avatar Andrea Marchesini
Browse files

Bug 959988 - Remove URLSearchParams.prototype.size, r=ehsan

parent a671e699
No related merge requests found
......@@ -301,13 +301,6 @@ URLSearchParams::Delete(const nsAString& aName)
NotifyObserver();
}
uint32_t
URLSearchParams::Size()
{
Validate();
return mSearchParams.Count();
}
void
URLSearchParams::DeleteAll()
{
......
......@@ -85,8 +85,6 @@ public:
void Delete(const nsAString& aName);
uint32_t Size();
void Stringify(nsString& aRetval)
{
Validate();
......
......@@ -32,23 +32,19 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=887836
is(u.has('foo'), false, 'URLSearchParams.has(foo)');
is(u.get('foo'), '', 'URLSearchParams.get(foo)');
is(u.getAll('foo').length, 0, 'URLSearchParams.getAll(foo)');
is(u.size, 0, 'URLSearchParams.size()');
u.append('foo', 'bar');
is(u.has('foo'), true, 'URLSearchParams.has(foo)');
is(u.get('foo'), 'bar', 'URLSearchParams.get(foo)');
is(u.getAll('foo').length, 1, 'URLSearchParams.getAll(foo)');
is(u.size, 1, 'URLSearchParams.size()');
u.set('foo', 'bar2');
is(u.get('foo'), 'bar2', 'URLSearchParams.get(foo)');
is(u.getAll('foo').length, 1, 'URLSearchParams.getAll(foo)');
is(u.size, 1, 'URLSearchParams.size()');
is(u + "", "foo=bar2", "stringifier");
u.delete('foo');
is(u.size, 0, 'URLSearchParams.size()');
runTest();
}
......@@ -57,10 +53,8 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=887836
var u = new URLSearchParams();
ok(u, "URLSearchParams created");
u.append('foo', 'bar');
is(u.size, 1, "u.size()");
var uu = new URLSearchParams(u);
is(uu.size, 1, "uu.size()");
is(uu.get('foo'), 'bar', 'uu.get()');
u.append('foo', 'bar2');
......@@ -114,8 +108,6 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=887836
is(all[k], checks[i].data[key][k], "value matches");
}
}
is(u.size, count, "size matches");
}
runTest();
......
......@@ -22,6 +22,5 @@ interface URLSearchParams {
sequence<DOMString> getAll(DOMString name);
boolean has(DOMString name);
void set(DOMString name, DOMString value);
readonly attribute unsigned long size;
stringifier;
};
......@@ -29,23 +29,19 @@ onmessage = function() {
is(u.has('foo'), false, 'URLSearchParams.has(foo)');
is(u.get('foo'), '', 'URLSearchParams.get(foo)');
is(u.getAll('foo').length, 0, 'URLSearchParams.getAll(foo)');
is(u.size, 0, 'URLSearchParams.size()');
u.append('foo', 'bar');
is(u.has('foo'), true, 'URLSearchParams.has(foo)');
is(u.get('foo'), 'bar', 'URLSearchParams.get(foo)');
is(u.getAll('foo').length, 1, 'URLSearchParams.getAll(foo)');
is(u.size, 1, 'URLSearchParams.size()');
u.set('foo', 'bar2');
is(u.get('foo'), 'bar2', 'URLSearchParams.get(foo)');
is(u.getAll('foo').length, 1, 'URLSearchParams.getAll(foo)');
is(u.size, 1, 'URLSearchParams.size()');
is(u + "", "foo=bar2", "stringify");
u.delete('foo');
is(u.size, 0, 'URLSearchParams.size()');
runTest();
}
......@@ -54,10 +50,8 @@ onmessage = function() {
var u = new URLSearchParams();
ok(u, "URLSearchParams created");
u.append('foo', 'bar');
is(u.size, 1, "u.size()");
var uu = new URLSearchParams(u);
is(uu.size, 1, "uu.size()");
is(uu.get('foo'), 'bar', 'uu.get()');
u.append('foo', 'bar2');
......@@ -111,8 +105,6 @@ onmessage = function() {
is(all[k], checks[i].data[key][k], "value matches");
}
}
is(u.size, count, "size matches");
}
runTest();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment