1
0
Fork 0
firefox/testing/web-platform/tests/webidl/ecmascript-binding/builtin-function-properties.any.js
Daniel Baumann 5e9a113729
Adding upstream version 140.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
2025-06-25 09:37:52 +02:00

23 lines
856 B
JavaScript

"use strict";
test(() => {
const ownPropKeys = Reflect.ownKeys(Blob).slice(0, 3);
assert_array_equals(ownPropKeys, ["length", "name", "prototype"]);
}, 'Constructor property enumeration order of "length", "name", and "prototype"');
test(() => {
assert_own_property(Blob.prototype, "slice");
const ownPropKeys = Reflect.ownKeys(Blob.prototype.slice).slice(0, 2);
assert_array_equals(ownPropKeys, ["length", "name"]);
}, 'Method property enumeration order of "length" and "name"');
test(() => {
assert_own_property(Blob.prototype, "size");
const desc = Reflect.getOwnPropertyDescriptor(Blob.prototype, "size");
assert_equals(typeof desc.get, "function");
const ownPropKeys = Reflect.ownKeys(desc.get).slice(0, 2);
assert_array_equals(ownPropKeys, ["length", "name"]);
}, 'Getter property enumeration order of "length" and "name"');