Lines Matching refs:name
23 * = extAttrs:extendedAttributeList? S? "interface" S name:identifier w herit:ifInheritance? w "{" w mem:ifMember* w "}" w ";" w
24 * { return { type: "interface", name: name, inheritance: herit, members: mem, extAttrs: extAttrs }; }
27 * the string "interface", a .name property equal to the identifier that the
168 * run by calling this.members[name].test_object(obj) for each obj in
169 * this.objects[name]. obj is a string that will be eval'd to produce a
220 IdlArray.prototype.is_excluded_by_options = function (name, options)
223 (options.except && options.except.includes(name)
224 || options.only && !options.only.includes(name));
247 this.partials.forEach(p => all_deps.add(p.name));
290 const defined_or_untested = name => {
296 return name in this.members
297 || this.is_excluded_by_options(name, options);
299 // Maps name -> [parsed_idl, ...]
302 if (parsed.name) {
303 deps.push(parsed.name);
309 deps = deps.filter(function(name) {
310 if (!name
311 || name === parsed.name && defined_or_untested(name)
312 || !all_deps.has(name)) {
315 if (name && !(name in this.members)) {
316 this.skipped.has(name)
317 ? this.skipped.get(name).push(parsed)
318 : this.skipped.set(name, [parsed]);
325 deps.forEach(function(name) {
326 if (!new_options.only.includes(name)) {
327 new_options.only.push(name);
334 const inheritor = parsed.name || parsed.target;
341 return p.name === inheriting;
398 var should_skip = name => {
399 return this.is_excluded_by_options(name, options);
412 if (should_skip(parsed_idl.name))
431 if (should_skip(parsed_idl.name))
435 if (parsed_idl.name in this.members)
437 throw new IdlHarnessError("Duplicate identifier " + parsed_idl.name);
443 this.members[parsed_idl.name] =
448 this.members[parsed_idl.name] =
455 this.members[parsed_idl.name] = new IdlDictionary(parsed_idl);
459 this.members[parsed_idl.name] = new IdlTypedef(parsed_idl);
463 this.members[parsed_idl.name] = new IdlCallback(parsed_idl);
467 this.members[parsed_idl.name] = new IdlEnum(parsed_idl);
471 this.members[parsed_idl.name] =
476 this.members[parsed_idl.name] = new IdlNamespace(parsed_idl);
480 throw parsed_idl.name + ": " + parsed_idl.type + " not yet supported";
501 IdlArray.prototype.prevent_multiple_testing = function(name)
504 this.members[name].prevent_multiple_testing = true;
589 map.set(m.name, m.idlType);
602 var mixins = this.includes[thing.name];
607 throw new Error("Interface " + id + " not found (implemented by " + thing.name + ")");
616 throw new Error("Interface " + thing.base + " not found (inherited by " + thing.name + ")");
627 var exposed = object.extAttrs && object.extAttrs.filter(a => a.name === "Exposed");
630 `Multiple 'Exposed' extended attributes on ${object.name}`);
721 const lhs = member.name;
746 for (var name in this.members)
748 this.members[name].test();
749 if (name in this.objects)
751 const objects = this.objects[name];
753 throw new IdlHarnessError(`Invalid or empty objects for member ${name}`);
757 if (!this.members[name] || !(this.members[name] instanceof IdlInterface)) {
758 throw new IdlHarnessError(`Invalid object member name ${name}`);
760 this.members[name].test_object(str);
771 const originalExists = parsed_idl.name in this.members
772 && (this.members[parsed_idl.name] instanceof IdlInterface
773 || this.members[parsed_idl.name] instanceof IdlDictionary
774 || this.members[parsed_idl.name] instanceof IdlNamespace);
776 // Ensure unique test name in case of multiple partials.
777 let partialTestName = parsed_idl.name;
779 if (testedPartials.has(parsed_idl.name)) {
780 partialTestCount += testedPartials.get(parsed_idl.name);
783 testedPartials.set(parsed_idl.name, partialTestCount);
799 expected.prototype.isPrototypeOf(this.members[parsed_idl.name]),
800 `Original ${parsed_idl.name} definition should have type ${parsed_idl.type}`);
814 const exposureAttr = parsed_idl.extAttrs.find(a => a.name === "Exposed");
819 const memberExposure = exposure_set(this.members[parsed_idl.name]);
825 `Partial ${parsed_idl.name} ${parsed_idl.type} is exposed everywhere, the original ${parsed_idl.type} is not.`);
827 partialExposure.forEach(name => {
828 if (!memberExposure || !memberExposure.has(name)) {
830 `Partial ${parsed_idl.name} ${parsed_idl.type} is exposed to '${name}', the original ${parsed_idl.type} is not.`);
843 if (extAttr.name === "Exposed") {
846 this.members[parsed_idl.name].extAttrs.push(extAttr);
852 return this.members[parsed_idl.name].members.find(function(m) {
858 this.members[parsed_idl.name].members.push(new IdlInterfaceMember(member));
860 assert_true(!clash, "member " + (clash && clash.name) + " is unique");
890 "member " + member.name + " is unique");
893 assert_true(!clash, "member " + (clash && clash.name) + " is unique");
901 if (m1.name !== m2.name) {
1103 // This is a catch-all for any IDL type name which follows JS class
1159 IdlObject.prototype.has_extended_attribute = function(name)
1167 return o.name == name;
1182 this.name = obj.name;
1191 * The name (as a string) of the dictionary type we inherit from, or null
1211 this.name = obj.name;
1235 * The name (as a string) of the type we inherit from, or null if there is
1271 return attribute.name === "Global";
1283 return attribute.name === "LegacyNamespace";
1309 assert_own_property(self[owner], this.name, owner + " does not have own property " + format_value(this.name));
1315 throw new IdlHarnessError(this.name + " has no interface object due to " + reason);
1318 return this.get_interface_object_owner()[this.name];
1322 // https://webidl.spec.whatwg.org/#qualified-name
1325 return legacyNamespace + "." + this.name;
1327 return this.name;
1367 throw new Error(idl_interface.type + " " + idl_interface.base + " not found (inherited by " + idl_interface.name + ")");
1370 const dep_chain = stack.map(i => i.name).join(',');
1371 throw new IdlHarnessError(`${this.name} has a circular dependency: ${dep_chain}`);
1396 map.set(m.name, m.idlType);
1422 subsetTestByKey(this.name, test, function() {
1423 assert_false(this.name in self);
1424 }.bind(this), this.name + " interface: existence and properties of interface object");
1453 subsetTestByKey(this.name, test, function()
1459 // The name of the property is the identifier of the interface, and its
1466 var desc = Object.getOwnPropertyDescriptor(this.get_interface_object_owner(), this.name);
1467 assert_false("get" in desc, "self's property " + format_value(this.name) + " should not have a getter");
1468 assert_false("set" in desc, "self's property " + format_value(this.name) + " should not have a setter");
1469 assert_true(desc.writable, "self's property " + format_value(this.name) + " should be writable");
1470 assert_false(desc.enumerable, "self's property " + format_value(this.name) + " should not be enumerable");
1471 assert_true(desc.configurable, "self's property " + format_value(this.name) + " should be configurable");
1477 "prototype of self's property " + format_value(this.name) + " is not Object.prototype");
1504 assert_class_string(this.get_interface_object(), "Function", "class string of " + this.name);
1517 'prototype of ' + this.name + ' is not ' +
1525 "prototype of self's property " + format_value(this.name) + " is not Function.prototype");
1542 }.bind(this), this.name + " interface: existence and properties of interface object");
1545 subsetTestByKey(this.name, test, function() {
1557 assert_false("get" in desc, this.name + ".length should not have a getter");
1558 assert_false("set" in desc, this.name + ".length should not have a setter");
1559 assert_false(desc.writable, this.name + ".length should not be writable");
1560 assert_false(desc.enumerable, this.name + ".length should not be enumerable");
1561 assert_true(desc.configurable, this.name + ".length should be configurable");
1565 assert_equals(this.get_interface_object().length, expected_length, "wrong value for " + this.name + ".length");
1566 }.bind(this), this.name + " interface object length");
1570 subsetTestByKey(this.name, test, function() {
1576 // "All interface objects must have a property named “name” with
1581 assert_own_property(this.get_interface_object(), "name");
1582 var desc = Object.getOwnPropertyDescriptor(this.get_interface_object(), "name");
1583 assert_false("get" in desc, this.name + ".name should not have a getter");
1584 assert_false("set" in desc, this.name + ".name should not have a setter");
1585 assert_false(desc.writable, this.name + ".name should not be writable");
1586 assert_false(desc.enumerable, this.name + ".name should not be enumerable");
1587 assert_true(desc.configurable, this.name + ".name should be configurable");
1588 assert_equals(this.get_interface_object().name, this.name, "wrong value for " + this.name + ".name");
1589 }.bind(this), this.name + " interface object name");
1594 subsetTestByKey(this.name, test, function()
1596 var aliasAttrs = this.extAttrs.filter(function(o) { return o.name === "LegacyWindowAlias"; });
1598 throw new IdlHarnessError("Invalid IDL: multiple LegacyWindowAlias extended attributes on " + this.name);
1601 throw new IdlHarnessError("Invalid IDL: LegacyWindowAlias extended attribute on non-interface " + this.name);
1604 throw new IdlHarnessError("Invalid IDL: LegacyWindowAlias extended attribute on " + this.name + " which is not exposed in Window");
1613 throw new IdlHarnessError("Invalid IDL: LegacyWindowAlias extended attribute on " + this.name + " without identifier");
1642 }.bind(this), this.name + " interface: legacy window alias");
1647 .filter(function(attr) { return attr.name == "LegacyFactoryFunction"; });
1654 subsetTestByKey(this.name, test, function()
1660 // global object. The name of the property is the
1665 var name = constructor.rhs.value;
1666 assert_own_property(self, name);
1667 var desc = Object.getOwnPropertyDescriptor(self, name);
1668 assert_equals(desc.value, self[name], "wrong value in " + name + " property descriptor");
1669 assert_true(desc.writable, name + " should be writable");
1670 assert_false(desc.enumerable, name + " should not be enumerable");
1671 assert_true(desc.configurable, name + " should be configurable");
1672 assert_false("get" in desc, name + " should not have a getter");
1673 assert_false("set" in desc, name + " should not have a setter");
1674 }.bind(this), this.name + " interface: named constructor");
1676 subsetTestByKey(this.name, test, function()
1682 var name = constructor.rhs.value;
1683 var value = self[name];
1684 assert_equals(typeof value, "function", "type of value in " + name + " property descriptor");
1685 assert_not_equals(value, this.get_interface_object(), "wrong value in " + name + " property descriptor");
1686 assert_equals(Object.getPrototypeOf(value), Function.prototype, "wrong value for " + name + "'s prototype");
1687 }.bind(this), this.name + " interface: named constructor object");
1689 subsetTestByKey(this.name, test, function()
1700 var name = constructor.rhs.value;
1702 var desc = Object.getOwnPropertyDescriptor(self[name], "prototype");
1703 assert_equals(desc.value, expected, "wrong value for " + name + ".prototype");
1709 }.bind(this), this.name + " interface: named constructor prototype property");
1711 subsetTestByKey(this.name, test, function()
1716 var name = constructor.rhs.value;
1717 var desc = Object.getOwnPropertyDescriptor(self[name], "name");
1718 assert_equals(desc.value, name, "wrong value for " + name + ".name");
1719 assert_false(desc.writable, "name should not be writable");
1720 assert_false(desc.enumerable, "name should not be enumerable");
1721 assert_true(desc.configurable, "name should be configurable");
1722 assert_false("get" in desc, "name should not have a getter");
1723 assert_false("set" in desc, "name should not have a setter");
1724 }.bind(this), this.name + " interface: named constructor name");
1726 subsetTestByKey(this.name, test, function()
1735 var name = constructor.rhs.value;
1736 var desc = Object.getOwnPropertyDescriptor(self[name], "length");
1737 assert_equals(desc.value, min_length, "wrong value for " + name + ".length");
1743 }.bind(this), this.name + " interface: named constructor length");
1745 subsetTestByKey(this.name, test, function()
1751 var name = constructor.rhs.value;
1755 assert_throws_js(globalOf(self[name]).TypeError, function() {
1756 self[name](...args);
1758 }.bind(this), this.name + " interface: named constructor without 'new'");
1761 subsetTestByKey(this.name, test, function()
1774 this.name + ' should not have a "prototype" property');
1786 'interface "' + this.name + '" does not have own property "prototype"');
1788 assert_false("get" in desc, this.name + ".prototype should not have a getter");
1789 assert_false("set" in desc, this.name + ".prototype should not have a setter");
1790 assert_false(desc.writable, this.name + ".prototype should not be writable");
1791 assert_false(desc.enumerable, this.name + ".prototype should not be enumerable");
1792 assert_false(desc.configurable, this.name + ".prototype should not be configurable");
1819 if (this.name === "Window") {
1822 'Class name for prototype of Window' +
1833 } else if (this.name === "DOMException") {
1847 'prototype of ' + this.name + '.prototype is not ' + inherit_interface + '.prototype');
1854 'Class name for prototype of ' + this.name +
1864 // prototype name.
1868 // "class string of " + this.name + ".prototype");
1874 // "String(" + this.name + ".prototype)");
1876 }.bind(this), this.name + " interface: existence and properties of interface prototype object");
1888 subsetTestByKey(this.name, test, function()
1898 this.name + ' should not have a "prototype" property');
1903 'interface "' + this.name + '" does not have own property "prototype"');
1911 this.name + '.prototype does not have own property "constructor"');
1913 assert_false("get" in desc, this.name + ".prototype.constructor should not have a getter");
1914 assert_false("set" in desc, this.name + ".prototype.constructor should not have a setter");
1915 assert_true(desc.writable, this.name + ".prototype.constructor should be writable");
1916 assert_false(desc.enumerable, this.name + ".prototype.constructor should not be enumerable");
1917 assert_true(desc.configurable, this.name + ".prototype.constructor should be configurable");
1919 this.name + '.prototype.constructor is not the same object as ' + this.name);
1920 }.bind(this), this.name + ' interface: existence and properties of interface prototype object\'s "constructor" property');
1923 subsetTestByKey(this.name, test, function()
1933 this.name + ' should not have a "prototype" property');
1938 'interface "' + this.name + '" does not have own property "prototype"');
1942 // whose name is the @@unscopables symbol, which has the attributes
1945 var unscopables = this.get_unscopables().map(m => m.name);
1950 this.name + '.prototype should have an @@unscopables property');
1953 this.name + ".prototype[Symbol.unscopables] should not have a getter");
1954 assert_false("set" in desc, this.name + ".prototype[Symbol.unscopables] should not have a setter");
1955 assert_false(desc.writable, this.name + ".prototype[Symbol.unscopables] should not be writable");
1956 assert_false(desc.enumerable, this.name + ".prototype[Symbol.unscopables] should not be enumerable");
1957 assert_true(desc.configurable, this.name + ".prototype[Symbol.unscopables] should be configurable");
1959 this.name + '.prototype[Symbol.unscopables] should be in the descriptor');
1961 this.name + '.prototype[Symbol.unscopables] should be an object');
1963 this.name + '.prototype[Symbol.unscopables] should have a null prototype');
1966 this.name + '.prototype[Symbol.unscopables] should have the right number of symbol-named properties');
1974 this.name + '.prototype[Symbol.unscopables] has unexpected property "' + prop + '"');
1979 this.name + '.prototype should not have @@unscopables');
1981 }.bind(this), this.name + ' interface: existence and properties of interface prototype object\'s @@unscopables property');
1990 subsetTestByKey(this.name, test, function(t) {
2009 }.bind(this), this.name + " interface: internal [[SetPrototypeOf]] method " +
2013 subsetTestByKey(this.name, test, function(t) {
2051 }.bind(this), this.name + " interface: internal [[SetPrototypeOf]] method " +
2055 subsetTestByKey(this.name, test, function(t) {
2072 }.bind(this), this.name + " interface: internal [[SetPrototypeOf]] method " +
2076 subsetTestByKey(this.name, test, function() {
2080 }.bind(this), this.name + " interface: internal [[SetPrototypeOf]] method " +
2084 subsetTestByKey(this.name, test, function() {
2088 }.bind(this), this.name + " interface: internal [[SetPrototypeOf]] method " +
2092 subsetTestByKey(this.name, test, function() {
2096 }.bind(this), this.name + " interface: internal [[SetPrototypeOf]] method " +
2107 subsetTestByKey(this.name, test, function()
2114 assert_own_property(this.get_interface_object(), member.name);
2118 assert_equals(this.get_interface_object()[member.name], constValue(member.value),
2122 var desc = Object.getOwnPropertyDescriptor(this.get_interface_object(), member.name);
2128 }.bind(this), this.name + " interface: constant " + member.name + " on interface object");
2132 subsetTestByKey(this.name, test, function()
2138 this.name + ' should not have a "prototype" property');
2143 'interface "' + this.name + '" does not have own property "prototype"');
2145 assert_own_property(this.get_interface_object().prototype, member.name);
2146 assert_equals(this.get_interface_object().prototype[member.name], constValue(member.value),
2148 var desc = Object.getOwnPropertyDescriptor(this.get_interface_object(), member.name);
2154 }.bind(this), this.name + " interface: constant " + member.name + " on interface prototype object");
2160 if (!shouldRunSubTest(this.name)) {
2163 var a_test = subsetTestByKey(this.name, async_test, this.name + " interface: attribute " + member.name);
2173 'interface "' + this.name + '" does not have own property "prototype"');
2176 assert_own_property(this.get_interface_object(), member.name,
2178 format_value(member.name));
2186 assert_own_property(self, member.name,
2188 format_value(member.name));
2189 assert_false(member.name in this.get_interface_object().prototype,
2191 format_value(member.name));
2193 var getter = Object.getOwnPropertyDescriptor(self, member.name).get;
2195 format_value(member.name) + " must have a getter");
2203 propVal = self[member.name];
2217 assert_true(member.name in this.get_interface_object().prototype,
2219 format_value(member.name));
2225 this.get_interface_object().prototype[member.name];
2232 this.get_interface_object().prototype[member.name])
2241 assert_equals(this.get_interface_object().prototype[member.name], undefined,
2253 if (!shouldRunSubTest(this.name)) {
2256 var a_test = subsetTestByKey(this.name, async_test, this.name + " interface: operation " + member);
2271 this.name + ' should not have a "prototype" property');
2277 'interface "' + this.name + '" does not have own property "prototype"');
2291 assert_own_property(this.get_interface_object(), member.name,
2298 assert_own_property(self, member.name,
2304 assert_own_property(this.get_interface_object().prototype, member.name,
2322 var prop = member.name;
2325 this.name + '.prototype[Symbol.unscopables].' + prop + ' must exist')
2327 this.name + '.prototype[Symbol.unscopables].' + prop + ' must have no getter');
2329 this.name + '.prototype[Symbol.unscopables].' + prop + ' must have no setter');
2331 this.name + '.prototype[Symbol.unscopables].' + prop + ' must be writable');
2333 this.name + '.prototype[Symbol.unscopables].' + prop + ' must be enumerable');
2335 this.name + '.prototype[Symbol.unscopables].' + prop + ' must be configurable');
2337 this.name + '.prototype[Symbol.unscopables].' + prop + ' must have the value `true`');
2344 var desc = Object.getOwnPropertyDescriptor(memberHolderObject, member.name);
2357 assert_equals(typeof memberHolderObject[member.name], "function",
2361 return m.type == "operation" && m.name == member.name;
2364 memberHolderObject[member.name].length,
2368 memberHolderObject[member.name].name,
2369 member.name,
2370 "property has wrong .name");
2390 memberHolderObject[member.name] != self[member.name])
2393 throwOrReject(a_test, member, memberHolderObject[member.name], null, args,
2404 throwOrReject(a_test, member, memberHolderObject[member.name], {}, args,
2412 var instanceName = memberHolderObject && memberHolderObject.constructor.name
2413 || member.name + " object";
2415 subsetTestByKey(this.name, test, function() {
2419 assert_true(k in json, "property " + JSON.stringify(k) + " should be present in the output of " + this.name + ".prototype.toJSON()");
2427 }.bind(this), this.name + " interface: default toJSON operation on " + desc);
2429 subsetTestByKey(this.name, test, function() {
2432 }.bind(this), this.name + " interface: toJSON operation on " + desc);
2438 subsetTestByKey(this.name, test, function()
2449 assert_equals(iteratorDesc.value.name, isPairIterator ? "entries" : "values", "@@iterator function object should have the right name");
2462 assert_equals(desc.value.name, property, property + " function object should have the right name");
2471 }.bind(this), this.name + " interface: iterable<" + member.idlType.map(function(t) { return t.idlType; }).join(", ") + ">");
2475 subsetTestByKey(this.name, test, () => {
2494 for (const [name, length] of methods) {
2495 const desc = Object.getOwnPropertyDescriptor(proto, name);
2496 assert_equals(typeof desc.value, "function", `${name} should be a function`);
2497 assert_equals(desc.enumerable, false, `${name} enumerable`);
2498 assert_equals(desc.configurable, true, `${name} configurable`);
2499 assert_equals(desc.writable, true, `${name} writable`);
2500 assert_equals(desc.value.length, length, `${name} function object length should be ${length}`);
2501 assert_equals(desc.value.name, name, `${name} function object should have the right name`);
2516 assert_equals(sizeDesc.get.name, "get size", `size getter have the right name`);
2517 }, `${this.name} interface: maplike<${member.idlType.map(t => t.idlType).join(", ")}>`);
2521 subsetTestByKey(this.name, test, () => {
2539 for (const [name, length] of methods) {
2540 const desc = Object.getOwnPropertyDescriptor(proto, name);
2541 assert_equals(typeof desc.value, "function", `${name} should be a function`);
2542 assert_equals(desc.enumerable, false, `${name} enumerable`);
2543 assert_equals(desc.configurable, true, `${name} configurable`);
2544 assert_equals(desc.writable, true, `${name} writable`);
2545 assert_equals(desc.value.length, length, `${name} function object length should be ${length}`);
2546 assert_equals(desc.value.name, name, `${name} function object should have the right name`);
2561 assert_equals(sizeDesc.get.name, "size", `size getter have the right name`);
2562 }, `${this.name} interface: setlike<${member.idlType.map(t => t.idlType).join(", ")}>`);
2567 subsetTestByKey(this.name, test, function()
2578 assert_equals(iteratorDesc.value.name, isPairIterator ? "entries" : "values", "@@asyncIterator function object should have the right name");
2586 assert_equals(desc.value.name, property, property + " function object should have the right name");
2593 }.bind(this), this.name + " interface: async iterable<" + member.idlType.map(function(t) { return t.idlType; }).join(", ") + ">");
2598 subsetTestByKey(this.name, test, function()
2608 this.name + ' should not have a "prototype" property');
2613 'interface "' + this.name + '" does not have own property "prototype"');
2654 }.bind(this), this.name + " interface: stringifier");
2667 subsetTestByKey(this.name, test, function() {
2669 assert_false(member.name in this.get_interface_object(),
2671 format_value(member.name));
2672 assert_false(member.name in this.get_interface_object().prototype,
2674 format_value(member.name));
2675 }.bind(this), this.name + " interface: member " + member.name);
2701 if (member.name) {
2744 if (this.name == "HTMLAllCollection")
2759 if (!(current_interface.name in this.array.members))
2761 throw new IdlHarnessError("Interface " + current_interface.name + " not found (inherited by " + this.name + ")");
2800 subsetTestByKey(this.name, test, function()
2806 'interface "' + this.name + '" does not have own property "prototype"');
2814 desc + "'s prototype is not " + this.name + ".prototype");
2815 }.bind(this), this.name + " must be primary interface of " + desc);
2819 // interfaces must be the qualified name of the primary interface of the
2821 subsetTestByKey(this.name, test, function()
2837 if (!shouldRunSubTest(this.name)) {
2848 subsetTestByKey(this.name, test, function() {
2850 assert_false(member.name in obj);
2851 }.bind(this), this.name + " interface: " + desc + ' must not have property "' + member.name + '"');
2856 var a_test = subsetTestByKey(this.name, async_test, this.name + " interface: " + desc + ' must have own property "' + member.name + '"');
2865 member.name &&
2868 var a_test = subsetTestByKey(this.name, async_test, this.name + " interface: " + desc + ' must have own property "' + member.name + '"');
2873 assert_own_property(obj, member.name,
2881 && member.name)
2883 subsetTestByKey(this.name, test, function()
2889 assert_inherits(obj, member.name);
2891 assert_own_property(obj, member.name);
2896 assert_equals(obj[member.name], constValue(member.value));
2906 property = obj[member.name];
2914 if (this.name == "Document" && member.name == "all")
2927 assert_equals(typeof obj[member.name], "function");
2930 }.bind(this), this.name + " interface: " + desc + ' must inherit property "' + member + '" with the proper type');
2935 if (member.type == "operation" && member.name && member.arguments.length)
2938 this.name + " interface: calling " + member + " on " + desc +
2940 var a_test = subsetTestByKey(this.name, async_test, description);
2948 assert_inherits(obj, member.name);
2950 assert_own_property(obj, member.name);
2952 fn = obj[member.name];
2956 assert_own_property(obj.constructor, member.name, "interface object must have static operation as own property");
2957 fn = obj.constructor[member.name];
2961 return m.type == "operation" && m.name == member.name;
2984 if (this.name === "DOMException") {
3010 // "The name of the property is the identifier of the attribute."
3011 assert_own_property(obj, member.name);
3019 var desc = Object.getOwnPropertyDescriptor(obj, member.name);
3063 // "Let name be the string "get " prepended to attribute’s identifier."
3064 // "Perform ! SetFunctionName(F, name)."
3065 assert_equals(desc.get.name, "get " + member.name,
3066 "getter must have the name 'get " + member.name + "'");
3109 // "Let name be the string "set " prepended to id."
3110 // "Perform ! SetFunctionName(F, name)."
3111 assert_equals(desc.set.name, "set " + member.name,
3112 "The attribute setter must have the name 'set " + member.name + "'");
3146 return this.type == "operation" && this.special !== "static" && this.name == "toJSON";
3173 return this.name + "(" + args + ")";
3176 return this.name;
3227 this.name = obj.name;
3246 this.name = obj.name;
3264 this.name = obj.name;
3276 this.name = obj.name;
3290 var desc = Object.getOwnPropertyDescriptor(memberHolderObject, member.name);
3305 typeof memberHolderObject[member.name],
3310 memberHolderObject[member.name].length,
3312 return m.type == "operation" && m.name == member.name;
3320 if (!shouldRunSubTest(this.name)) {
3324 this.name,
3326 this.name + ' namespace: operation ' + member);
3329 self[this.name],
3330 member.name,
3331 'namespace object missing operation ' + format_value(member.name));
3333 this.do_member_operation_asserts(self[this.name], member, a_test);
3339 if (!shouldRunSubTest(this.name)) {
3343 this.name,
3345 this.name + ' namespace: attribute ' + member.name);
3349 self[this.name],
3350 member.name,
3351 this.name + ' does not have property ' + format_value(member.name));
3353 var desc = Object.getOwnPropertyDescriptor(self[this.name], member.name);
3366 subsetTestByKey(this.name, test, () => {
3367 assert_true(this.extAttrs.every(o => o.name === "Exposed" || o.name === "SecureContext"),
3371 }, `${this.name} namespace: extended attributes`);
3373 const namespaceObject = self[this.name];
3375 subsetTestByKey(this.name, test, () => {
3376 const desc = Object.getOwnPropertyDescriptor(self, this.name);
3377 assert_equals(desc.value, namespaceObject, `wrong value for ${this.name} namespace object`);
3383 }, `${this.name} namespace: property descriptor`);
3385 subsetTestByKey(this.name, test, () => {
3387 }, `${this.name} namespace: [[Extensible]] is true`);
3389 subsetTestByKey(this.name, test, () => {
3392 if (this.name === "console") {
3400 }, `${this.name} namespace: [[Prototype]] is Object.prototype`);
3402 subsetTestByKey(this.name, test, () => {
3404 }, `${this.name} namespace: typeof is "object"`);
3406 subsetTestByKey(this.name, test, () => {
3412 }, `${this.name} namespace: has no length property`);
3414 subsetTestByKey(this.name, test, () => {
3416 Object.getOwnPropertyDescriptor(namespaceObject, "name"),
3418 "name property must be undefined"
3420 }, `${this.name} namespace: has no name property`);
3441 throw 'Invalid namespace member ' + v.name + ': ' + v.type + ' not supported';
3452 * @param {String[]} srcs Spec name(s) for source idl files (fetched from
3453 * /interfaces/{name}.idl).
3454 * @param {String[]} deps Spec name(s) for dependency idl files (fetched
3455 * from /interfaces/{name}.idl). Order is important - dependencies from