Bug 1456887 part 1. Remove the [ArrayClass] annotation from DOMRectList. r=qdot

The NoInterfaceObject bit is me cleaning up after spec editors who change the
spec without updating the tests...
This commit is contained in:
Boris Zbarsky 2018-04-26 01:38:06 -04:00
parent 04d21ccac0
commit db41f3a815
4 changed files with 6 additions and 14 deletions

View File

@ -29,11 +29,8 @@ function doc(id) {
function checkElement(id, list, eps, doc) {
var e = (doc || document).getElementById(id);
var clientRects = e.getClientRects();
ok(clientRects instanceof e.ownerDocument.defaultView.Array,
"getClientRects retval should have Array.prototype on its proto chain");
clientRects.map(function(rect) {
ok(rect instanceof DOMRect, "Should have a DOMRect here");
});
ok(!(clientRects instanceof e.ownerDocument.defaultView.Array),
"getClientRects retval should not have Array.prototype on its proto chain");
is(clientRects.length, list.length, "getClientRects().length for element '" + id + "'");
var bounds = list.length > 0 ? list[0] : [0,0,0,0];
for (var i = 0; i < clientRects.length && i < list.length; ++i) {

View File

@ -4,7 +4,6 @@
* You can obtain one at http://mozilla.org/MPL/2.0/.
*/
[ArrayClass]
interface DOMRectList {
readonly attribute unsigned long length;
getter DOMRect? item(unsigned long index);

View File

@ -1,4 +0,0 @@
[DOMRectList.html]
[DOMRectList [NoInterfaceObject\]]
expected: FAIL

View File

@ -10,12 +10,12 @@ setup(() => {
});
test(() => {
assert_false('DOMRectList' in window);
}, 'DOMRectList [NoInterfaceObject]');
assert_true('DOMRectList' in window);
}, 'DOMRectList is not [NoInterfaceObject]');
test(() => {
assert_true(domRectList instanceof Array);
}, 'DOMRectList [LegacyArrayClass]');
assert_false(domRectList instanceof Array);
}, 'DOMRectList is not [LegacyArrayClass]');
test(() => {
assert_equals(domRectList.length, 1);