Bug 1495761 [wpt PR 13314] - Removes annotations from idlharness.js, a=testonly
authorAkansha <akanshasinghal999@gmail.com>
Tue, 09 Oct 2018 04:12:33 +0000
changeset 498626 becdf312fccfadf499092c0c0f1f73a7d08a854d
parent 498625 523bc51156a96f68dd34ee964a1a9647ac4e7567
child 498627 339db7b866123a09388635cd70dcee6ad534163f
push id1864
push userffxbld-merge
push dateMon, 03 Dec 2018 15:51:40 +0000
treeherdermozilla-release@f040763d99ad [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstestonly
bugs1495761, 13314, 10212
milestone64.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1495761 [wpt PR 13314] - Removes annotations from idlharness.js, a=testonly Automatic update from web-platform-testsRemove annotations from idlharness.js (#13314) Fixes https://github.com/web-platform-tests/wpt/issues/10212. -- wpt-commits: 04a753c1a41e20a3d65760de793a71fdfe465dff wpt-pr: 13314
testing/web-platform/tests/resources/idlharness.js
--- a/testing/web-platform/tests/resources/idlharness.js
+++ b/testing/web-platform/tests/resources/idlharness.js
@@ -52,28 +52,25 @@ policies and contribution forms [3].
 if (!('subsetTestByKey' in self)) {
     self.subsetTestByKey = function(key, callback, ...args) {
       return callback(...args);
     }
     self.shouldRunSubTest = () => true;
 }
 /// Helpers ///
 function constValue (cnt)
-//@{
 {
     if (cnt.type === "null") return null;
     if (cnt.type === "NaN") return NaN;
     if (cnt.type === "Infinity") return cnt.negative ? -Infinity : Infinity;
     if (cnt.type === "number") return +cnt.value;
     return cnt.value;
 }
 
-//@}
 function minOverloadLength(overloads)
-//@{
 {
     // "The value of the Function object’s “length” property is
     // a Number determined as follows:
     // ". . .
     // "Return the length of the shortest argument list of the
     // entries in S."
     if (!overloads.length) {
         return 0;
@@ -82,19 +79,17 @@ function minOverloadLength(overloads)
     return overloads.map(function(attr) {
         return attr.arguments ? attr.arguments.filter(function(arg) {
             return !arg.optional && !arg.variadic;
         }).length : 0;
     })
     .reduce(function(m, n) { return Math.min(m, n); });
 }
 
-//@}
 function throwOrReject(a_test, operation, fn, obj, args, message, cb)
-//@{
 {
     if (operation.idlType.generic !== "Promise") {
         assert_throws(new TypeError(), function() {
             fn.apply(obj, args);
         }, message);
         cb();
     } else {
         try {
@@ -103,69 +98,59 @@ function throwOrReject(a_test, operation
             a_test.step(function() {
                 assert_unreached("Throws \"" + e + "\" instead of rejecting promise");
                 cb();
             });
         }
     }
 }
 
-//@}
 function awaitNCallbacks(n, cb, ctx)
-//@{
 {
     var counter = 0;
     return function() {
         counter++;
         if (counter >= n) {
             cb();
         }
     };
 }
 
-//@}
 var fround =
-//@{
 (function(){
     if (Math.fround) return Math.fround;
 
     var arr = new Float32Array(1);
     return function fround(n) {
         arr[0] = n;
         return arr[0];
     };
 })();
-//@}
 
 /// IdlHarnessError ///
 // Entry point
 self.IdlHarnessError = function(message)
-//@{
 {
     /**
      * Message to be printed as the error's toString invocation.
      */
     this.message = message;
 };
 
 IdlHarnessError.prototype = Object.create(Error.prototype);
 
-//@}
 IdlHarnessError.prototype.toString = function()
-//@{
 {
     return this.message;
 };
 
-//@}
 
 /// IdlArray ///
 // Entry point
 self.IdlArray = function()
-//@{
 {
     /**
      * A map from strings to the corresponding named IdlObject, such as
      * IdlInterface or IdlException.  These are the things that test() will run
      * tests on.
      */
     this.members = {};
 
@@ -205,62 +190,50 @@ self.IdlArray = function()
      * results in this["inheritance"] = { A: "B", B: "C" }
      */
     this.partials = [];
     this["implements"] = {};
     this["includes"] = {};
     this["inheritance"] = {};
 };
 
-//@}
 IdlArray.prototype.add_idls = function(raw_idls, options)
-//@{
 {
     /** Entry point.  See documentation at beginning of file. */
     this.internal_add_idls(WebIDL2.parse(raw_idls), options);
 };
 
-//@}
 IdlArray.prototype.add_untested_idls = function(raw_idls, options)
-//@{
 {
     /** Entry point.  See documentation at beginning of file. */
     var parsed_idls = WebIDL2.parse(raw_idls);
     this.mark_as_untested(parsed_idls);
     this.internal_add_idls(parsed_idls, options);
 };
 
-//@}
 IdlArray.prototype.mark_as_untested = function (parsed_idls)
-//@{
 {
     for (var i = 0; i < parsed_idls.length; i++) {
         parsed_idls[i].untested = true;
         if ("members" in parsed_idls[i]) {
             for (var j = 0; j < parsed_idls[i].members.length; j++) {
                 parsed_idls[i].members[j].untested = true;
             }
         }
     }
 };
-//@}
-
-//@}
+
 IdlArray.prototype.is_excluded_by_options = function (name, options)
-//@{
 {
     return options &&
         (options.except && options.except.includes(name)
          || options.only && !options.only.includes(name));
 };
-//@}
-
-//@}
+
 IdlArray.prototype.add_dependency_idls = function(raw_idls, options)
-//@{
 {
     const parsed_idls = WebIDL2.parse(raw_idls);
     const new_options = { only: [] }
 
     const all_deps = new Set();
     Object.values(this.inheritance).forEach(v => all_deps.add(v));
     Object.entries(this.implements).forEach(([k, v]) => {
         all_deps.add(k);
@@ -356,19 +329,17 @@ IdlArray.prototype.add_dependency_idls =
 
     this.mark_as_untested(parsed_idls);
 
     if (new_options.only.length) {
         this.internal_add_idls(parsed_idls, new_options);
     }
 }
 
-//@}
 IdlArray.prototype.internal_add_idls = function(parsed_idls, options)
-//@{
 {
     /**
      * Internal helper called by add_idls() and add_untested_idls().
      *
      * parsed_idls is an array of objects that come from WebIDLParser.js's
      * "definitions" production.  The add_untested_idls() entry point
      * additionally sets an .untested property on each object (and its
      * .members) so that they'll be skipped by test() -- they'll only be
@@ -496,45 +467,39 @@ IdlArray.prototype.internal_add_idls = f
             break;
 
         default:
             throw parsed_idl.name + ": " + parsed_idl.type + " not yet supported";
         }
     }.bind(this));
 };
 
-//@}
 IdlArray.prototype.add_objects = function(dict)
-//@{
 {
     /** Entry point.  See documentation at beginning of file. */
     for (var k in dict)
     {
         if (k in this.objects)
         {
             this.objects[k] = this.objects[k].concat(dict[k]);
         }
         else
         {
             this.objects[k] = dict[k];
         }
     }
 };
 
-//@}
 IdlArray.prototype.prevent_multiple_testing = function(name)
-//@{
 {
     /** Entry point.  See documentation at beginning of file. */
     this.members[name].prevent_multiple_testing = true;
 };
 
-//@}
 IdlArray.prototype.recursively_get_implements = function(interface_name)
-//@{
 {
     /**
      * Helper function for test().  Returns an array of things that implement
      * interface_name, so if the IDL contains
      *
      *   A implements B;
      *   B implements C;
      *   B implements D;
@@ -552,19 +517,17 @@ IdlArray.prototype.recursively_get_imple
         if (ret.indexOf(ret[i]) != ret.lastIndexOf(ret[i]))
         {
             throw new IdlHarnessError("Circular implements statements involving " + ret[i]);
         }
     }
     return ret;
 };
 
-//@}
 IdlArray.prototype.recursively_get_includes = function(interface_name)
-//@{
 {
     /**
      * Helper function for test().  Returns an array of things that implement
      * interface_name, so if the IDL contains
      *
      *   A includes B;
      *   B includes C;
      *   B includes D;
@@ -582,19 +545,17 @@ IdlArray.prototype.recursively_get_inclu
         if (ret.indexOf(ret[i]) != ret.lastIndexOf(ret[i]))
         {
             throw new IdlHarnessError("Circular includes statements involving " + ret[i]);
         }
     }
     return ret;
 };
 
-//@}
 IdlArray.prototype.is_json_type = function(type)
-//@{
 {
     /**
      * Checks whether type is a JSON type as per
      * https://heycam.github.io/webidl/#dfn-json-types
      */
 
     var idlType = type.idlType;
 
@@ -749,24 +710,22 @@ function exposed_in(globals) {
     }
     if ('ServiceWorkerGlobalScope' in self &&
         self instanceof ServiceWorkerGlobalScope) {
         return globals.has("ServiceWorker");
     }
     throw new IdlHarnessError("Unexpected global object");
 }
 
-//@}
 /**
  * Asserts that the given error message is thrown for the given function.
  * @param {string|IdlHarnessError} error Expected Error message.
  * @param {Function} idlArrayFunc Function operating on an IdlArray that should throw.
  */
 IdlArray.prototype.assert_throws = function(error, idlArrayFunc)
-//@{
 {
     try {
         idlArrayFunc.call(this, this);
     } catch (e) {
         if (e instanceof AssertionError) {
             throw e;
         }
         // Assertions for behaviour of the idlharness.js engine.
@@ -776,19 +735,17 @@ IdlArray.prototype.assert_throws = funct
         if (e.message !== error) {
             throw new IdlHarnessError(`${idlArrayFunc} threw "${e}", not the expected IdlHarnessError "${error}"`);
         }
         return;
     }
     throw new IdlHarnessError(`${idlArrayFunc} did not throw the expected IdlHarnessError`);
 }
 
-//@}
 IdlArray.prototype.test = function()
-//@{
 {
     /** Entry point.  See documentation at beginning of file. */
 
     // First merge in all the partial interfaces and implements statements we
     // encountered.
     this.collapse_partials();
 
     for (var lhs in this["implements"])
@@ -867,19 +824,17 @@ IdlArray.prototype.test = function()
                     throw new IdlHarnessError(`Invalid object member name ${name}`);
                 }
                 this.members[name].test_object(str);
             }.bind(this));
         }
     }
 };
 
-//@}
 IdlArray.prototype.collapse_partials = function()
-//@{
 {
     const testedPartials = new Map();
     this.partials.forEach(function(parsed_idl)
     {
         const originalExists = parsed_idl.name in this.members
             && (this.members[parsed_idl.name] instanceof IdlInterface
                 || this.members[parsed_idl.name] instanceof IdlDictionary
                 || this.members[parsed_idl.name] instanceof IdlNamespace);
@@ -950,19 +905,17 @@ IdlArray.prototype.collapse_partials = f
         parsed_idl.members.forEach(function(member)
         {
             this.members[parsed_idl.name].members.push(new IdlInterfaceMember(member));
         }.bind(this));
     }.bind(this));
     this.partials = [];
 }
 
-//@}
 IdlArray.prototype.assert_type_is = function(value, type)
-//@{
 {
     if (type.idlType in this.members
     && this.members[type.idlType] instanceof IdlTypedef) {
         this.assert_type_is(value, this.members[type.idlType].idlType);
         return;
     }
     if (type.union) {
         for (var i = 0; i < type.idlType.length; i++) {
@@ -1171,49 +1124,43 @@ IdlArray.prototype.assert_type_is = func
     {
         // TODO: Test when we actually have something to test this on
     }
     else
     {
         throw new IdlHarnessError("Type " + type + " isn't an interface or dictionary");
     }
 };
-//@}
 
 /// IdlObject ///
 function IdlObject() {}
 IdlObject.prototype.test = function()
-//@{
 {
     /**
      * By default, this does nothing, so no actual tests are run for IdlObjects
      * that don't define any (e.g., IdlDictionary at the time of this writing).
      */
 };
 
-//@}
 IdlObject.prototype.has_extended_attribute = function(name)
-//@{
 {
     /**
      * This is only meaningful for things that support extended attributes,
      * such as interfaces, exceptions, and members.
      */
     return this.extAttrs.some(function(o)
     {
         return o.name == name;
     });
 };
 
-//@}
 
 /// IdlDictionary ///
 // Used for IdlArray.prototype.assert_type_is
 function IdlDictionary(obj)
-//@{
 {
     /**
      * obj is an object produced by the WebIDLParser.js "dictionary"
      * production.
      */
 
     /** Self-explanatory. */
     this.name = obj.name;
@@ -1226,26 +1173,24 @@ function IdlDictionary(obj)
 
     /**
      * The name (as a string) of the dictionary type we inherit from, or null
      * if there is none.
      */
     this.base = obj.inheritance;
 }
 
-//@}
 IdlDictionary.prototype = Object.create(IdlObject.prototype);
 
 IdlDictionary.prototype.get_inheritance_stack = function() {
     return IdlInterface.prototype.get_inheritance_stack.call(this);
 };
 
 /// IdlInterface ///
 function IdlInterface(obj, is_callback, is_mixin)
-//@{
 {
     /**
      * obj is an object produced by the WebIDLParser.js "interface" production.
      */
 
     /** Self-explanatory. */
     this.name = obj.name;
 
@@ -1274,56 +1219,47 @@ function IdlInterface(obj, is_callback, 
      * The name (as a string) of the type we inherit from, or null if there is
      * none.
      */
     this.base = obj.inheritance;
 
     this._is_callback = is_callback;
     this._is_mixin = is_mixin;
 }
-//@}
 IdlInterface.prototype = Object.create(IdlObject.prototype);
 IdlInterface.prototype.is_callback = function()
-//@{
 {
     return this._is_callback;
 };
-//@}
 
 IdlInterface.prototype.is_mixin = function()
-//@{
 {
     return this._is_mixin;
 };
-//@}
 
 IdlInterface.prototype.has_constants = function()
-//@{
 {
     return this.members.some(function(member) {
         return member.type === "const";
     });
 };
-//@}
 
 IdlInterface.prototype.get_unscopables = function()
 {
     return this.members.filter(function(member) {
         return member.isUnscopable;
     });
 };
 
 IdlInterface.prototype.is_global = function()
-//@{
 {
     return this.extAttrs.some(function(attribute) {
         return attribute.name === "Global";
     });
 };
-//@}
 
 IdlInterface.prototype.has_to_json_regular_operation = function() {
     return this.members.some(function(m) {
         return m.is_to_json_regular_operation();
     });
 };
 
 IdlInterface.prototype.has_default_to_json_regular_operation = function() {
@@ -1441,17 +1377,16 @@ function _traverse_inherited_and_consequ
         });
     }
     if (stack.length > 0) {
         _traverse_inherited_and_consequential_interfaces(stack, callback);
     }
 }
 
 IdlInterface.prototype.test = function()
-//@{
 {
     if (this.has_extended_attribute("NoInterfaceObject") || this.is_mixin())
     {
         // No tests to do without an instance.  TODO: We should still be able
         // to run tests on the prototype object, if we obtain one through some
         // other means.
         return;
     }
@@ -1473,20 +1408,18 @@ IdlInterface.prototype.test = function()
     // operations, . . .).  These are run even if .untested is true, because
     // members might themselves be marked as .untested.  This might happen to
     // interfaces if the interface itself is untested but a partial interface
     // that extends it is tested -- then the interface itself and its initial
     // members will be marked as untested, but the members added by the partial
     // interface are still tested.
     this.test_members();
 };
-//@}
 
 IdlInterface.prototype.test_self = function()
-//@{
 {
     subsetTestByKey(this.name, test, function()
     {
         // This function tests WebIDL as of 2015-01-13.
 
         // "For every interface that is exposed in a given ECMAScript global
         // environment and:
         // * is a callback interface that has constants declared on it, or
@@ -1911,19 +1844,17 @@ IdlInterface.prototype.test_self = funct
             // It would be nice to assert that there is no @@unscopables on this
             // prototype, but someone might be calling us with only a subset of
             // the IDL the browser know about, and our subset may exclude
             // unscopable things that really do exist.
         }
     }.bind(this), this.name + ' interface: existence and properties of interface prototype object\'s @@unscopables property');
 };
 
-//@}
 IdlInterface.prototype.test_immutable_prototype = function(type, obj)
-//@{
 {
     if (typeof Object.setPrototypeOf !== "function") {
         return;
     }
 
     subsetTestByKey(this.name, test, function(t) {
         var originalValue = Object.getPrototypeOf(obj);
         var newValue = Object.create(null);
@@ -2015,19 +1946,17 @@ IdlInterface.prototype.test_immutable_pr
         var originalValue = Object.getPrototypeOf(obj);
 
         assert_true(Reflect.setPrototypeOf(obj, originalValue));
     }.bind(this), this.name + " interface: internal [[SetPrototypeOf]] method " +
         "of " + type + " - setting to its original value via Reflect.setPrototypeOf " +
         "should return true");
 };
 
-//@}
 IdlInterface.prototype.test_member_const = function(member)
-//@{
 {
     if (!this.has_constants()) {
         throw new IdlHarnessError("Internal error: test_member_const called without any constants");
     }
 
     subsetTestByKey(this.name, test, function()
     {
         assert_own_property(self, this.name,
@@ -2076,19 +2005,17 @@ IdlInterface.prototype.test_member_const
         assert_false("set" in desc, "property should not have a setter");
         assert_false(desc.writable, "property should not be writable");
         assert_true(desc.enumerable, "property should be enumerable");
         assert_false(desc.configurable, "property should not be configurable");
     }.bind(this), this.name + " interface: constant " + member.name + " on interface prototype object");
 };
 
 
-//@}
 IdlInterface.prototype.test_member_attribute = function(member)
-//@{
   {
     if (!shouldRunSubTest(this.name)) {
         return;
     }
     var a_test = subsetTestByKey(this.name, async_test, this.name + " interface: attribute " + member.name);
     a_test.step(function()
     {
         if (this.is_callback() && !this.has_constants()) {
@@ -2171,19 +2098,17 @@ IdlInterface.prototype.test_member_attri
               // do_interface_attribute_asserts must be the last thing we do,
               // since it will call done() on a_test.
               this.do_interface_attribute_asserts(self[this.name].prototype, member, a_test);
             }
         }
     }.bind(this));
 };
 
-//@}
 IdlInterface.prototype.test_member_operation = function(member)
-//@{
 {
     if (!shouldRunSubTest(this.name)) {
         return;
     }
     var a_test = subsetTestByKey(this.name, async_test, this.name + " interface: operation " + member.name +
                             "(" + member.arguments.map(
                                 function(m) {return m.idlType.idlType; } ).join(", ")
                             +")");
@@ -2268,19 +2193,17 @@ IdlInterface.prototype.do_member_unscopa
     assert_true(propDesc.enumerable,
                 this.name + '.prototype[Symbol.unscopables].' + prop + ' must be enumerable');
     assert_true(propDesc.configurable,
                 this.name + '.prototype[Symbol.unscopables].' + prop + ' must be configurable');
     assert_equals(propDesc.value, true,
                   this.name + '.prototype[Symbol.unscopables].' + prop + ' must have the value `true`');
 };
 
-//@}
 IdlInterface.prototype.do_member_operation_asserts = function(memberHolderObject, member, a_test)
-//@{
 {
     var done = a_test.done.bind(a_test);
     var operationUnforgeable = member.isUnforgeable;
     var desc = Object.getOwnPropertyDescriptor(memberHolderObject, member.name);
     // "The property has attributes { [[Writable]]: B,
     // [[Enumerable]]: true, [[Configurable]]: B }, where B is false if the
     // operation is unforgeable on the interface, and true otherwise".
     assert_false("get" in desc, "property should not have a getter");
@@ -2337,19 +2260,17 @@ IdlInterface.prototype.do_member_operati
         // interface.  (Have to be sure to get inheritance right.)
         throwOrReject(a_test, member, memberHolderObject[member.name], {}, args,
                       "calling operation with this = {} didn't throw TypeError", cb);
     } else {
         done();
     }
 }
 
-//@}
 IdlInterface.prototype.add_iterable_members = function(member)
-//@{
 {
     this.members.push(new IdlInterfaceMember(
         { type: "operation", name: "entries", idlType: "iterator", arguments: []}));
     this.members.push(new IdlInterfaceMember(
         { type: "operation", name: "keys", idlType: "iterator", arguments: []}));
     this.members.push(new IdlInterfaceMember(
         { type: "operation", name: "values", idlType: "iterator", arguments: []}));
     this.members.push(new IdlInterfaceMember(
@@ -2379,19 +2300,17 @@ IdlInterface.prototype.test_to_json_oper
     } else {
         subsetTestByKey(this.name, test, function() {
             assert_true(this.array.is_json_type(member.idlType), JSON.stringify(member.idlType) + " is not an appropriate return value for the toJSON operation of " + instanceName);
             this.array.assert_type_is(memberHolderObject.toJSON(), member.idlType);
         }.bind(this), "Test toJSON operation of " + instanceName);
     }
 };
 
-//@}
 IdlInterface.prototype.test_member_iterable = function(member)
-//@{
 {
     var interfaceName = this.name;
     var isPairIterator = member.idlType.length === 2;
     subsetTestByKey(this.name, test, function()
     {
         var descriptor = Object.getOwnPropertyDescriptor(self[interfaceName].prototype, Symbol.iterator);
         assert_true(descriptor.writable, "property should be writable");
         assert_true(descriptor.configurable, "property should be configurable");
@@ -2407,19 +2326,17 @@ IdlInterface.prototype.test_member_itera
         subsetTestByKey(this.name, test, function() {
             ["entries", "keys", "values", "forEach", Symbol.Iterator].forEach(function(property) {
                 assert_equals(self[interfaceName].prototype[property], Array.prototype[property], property + " function is not the same as Array one");
             });
         }, "Testing value iterable interface " + interfaceName);
     }
 };
 
-//@}
 IdlInterface.prototype.test_member_stringifier = function(member)
-//@{
 {
     subsetTestByKey(this.name, test, function()
     {
         if (this.is_callback() && !this.has_constants()) {
             return;
         }
 
         assert_own_property(self, this.name,
@@ -2471,19 +2388,17 @@ IdlInterface.prototype.test_member_strin
         // TODO: Test a platform object that implements some other
         // interface.  (Have to be sure to get inheritance right.)
         assert_throws(new TypeError(), function() {
             self[this.name].prototype.toString.apply({}, []);
         }, "calling stringifier with this = {} didn't throw TypeError");
     }.bind(this), this.name + " interface: stringifier");
 };
 
-//@}
 IdlInterface.prototype.test_members = function()
-//@{
 {
     for (var i = 0; i < this.members.length; i++)
     {
         var member = this.members[i];
         switch (member.type) {
         case "iterable":
             this.add_iterable_members(member);
             break;
@@ -2550,19 +2465,17 @@ IdlInterface.prototype.test_members = fu
             break;
         default:
             // TODO: check more member types.
             break;
         }
     }
 };
 
-//@}
 IdlInterface.prototype.test_object = function(desc)
-//@{
 {
     var obj, exception = null;
     try
     {
         obj = eval(desc);
     }
     catch(e)
     {
@@ -2587,19 +2500,17 @@ IdlInterface.prototype.test_object = fun
         {
             return;
         }
         current_interface.test_interface_of(desc, obj, exception, expected_typeof);
         current_interface = this.array.members[current_interface.base];
     }
 };
 
-//@}
 IdlInterface.prototype.test_primary_interface_of = function(desc, obj, exception, expected_typeof)
-//@{
 {
     // Only the object itself, not its members, are tested here, so if the
     // interface is untested, there is nothing to do.
     if (this.untested)
     {
         return;
     }
 
@@ -2651,19 +2562,17 @@ IdlInterface.prototype.test_primary_inte
         assert_class_string(obj, this.name, "class string of " + desc);
         if (!this.has_stringifier())
         {
             assert_equals(String(obj), "[object " + this.name + "]", "String(" + desc + ")");
         }
     }.bind(this), "Stringification of " + desc);
 };
 
-//@}
 IdlInterface.prototype.test_interface_of = function(desc, obj, exception, expected_typeof)
-//@{
 {
     // TODO: Indexed and named properties, more checks on interface members
     this.already_tested = true;
     if (!shouldRunSubTest(this.name)) {
         return;
     }
 
     for (var i = 0; i < this.members.length; i++)
@@ -2798,38 +2707,34 @@ IdlInterface.prototype.test_interface_of
         }
 
         if (member.is_to_json_regular_operation()) {
             this.test_to_json_operation(obj, member);
         }
     }
 };
 
-//@}
 IdlInterface.prototype.has_stringifier = function()
-//@{
 {
     if (this.name === "DOMException") {
         // toString is inherited from Error, so don't assume we have the
         // default stringifer
         return true;
     }
     if (this.members.some(function(member) { return member.stringifier; })) {
         return true;
     }
     if (this.base &&
         this.array.members[this.base].has_stringifier()) {
         return true;
     }
     return false;
 };
 
-//@}
 IdlInterface.prototype.do_interface_attribute_asserts = function(obj, member, a_test)
-//@{
 {
     // This function tests WebIDL as of 2015-01-27.
     // TODO: Consider [Exposed].
 
     // This is called by test_member_attribute() with the prototype as obj if
     // it is not a global, and the global otherwise, and by test_interface_of()
     // with the object as obj.
 
@@ -2942,21 +2847,19 @@ IdlInterface.prototype.do_interface_attr
         // "Let name be the string "set " prepended to id."
         // "Perform ! SetFunctionName(F, name)."
         assert_equals(desc.set.name, "set " + member.name,
             "The attribute setter must have the name 'set " + member.name + "'");
     }
 
     Promise.all(pendingPromises).then(a_test.done.bind(a_test));
 }
-//@}
 
 /// IdlInterfaceMember ///
 function IdlInterfaceMember(obj)
-//@{
 {
     /**
      * obj is an object produced by the WebIDLParser.js "ifMember" production.
      * We just forward all properties to this object without modification,
      * except for special extAttrs handling.
      */
     for (var k in obj)
     {
@@ -2966,26 +2869,24 @@ function IdlInterfaceMember(obj)
     {
         this.extAttrs = [];
     }
 
     this.isUnforgeable = this.has_extended_attribute("Unforgeable");
     this.isUnscopable = this.has_extended_attribute("Unscopable");
 }
 
-//@}
 IdlInterfaceMember.prototype = Object.create(IdlObject.prototype);
 
 IdlInterfaceMember.prototype.is_to_json_regular_operation = function() {
     return this.type == "operation" && !this.static && this.name == "toJSON";
 };
 
 /// Internal helper functions ///
 function create_suitable_object(type)
-//@{
 {
     /**
      * type is an object produced by the WebIDLParser.js "type" production.  We
      * return a JavaScript value that matches the type, if we can figure out
      * how.
      */
     if (type.nullable)
     {
@@ -3011,79 +2912,71 @@ function create_suitable_object(type)
         case "object":
             return {a: "b"};
 
         case "Node":
             return document.createTextNode("abc");
     }
     return null;
 }
-//@}
 
 /// IdlEnum ///
 // Used for IdlArray.prototype.assert_type_is
 function IdlEnum(obj)
-//@{
 {
     /**
      * obj is an object produced by the WebIDLParser.js "dictionary"
      * production.
      */
 
     /** Self-explanatory. */
     this.name = obj.name;
 
     /** An array of values produced by the "enum" production. */
     this.values = obj.values;
 
 }
-//@}
 
 IdlEnum.prototype = Object.create(IdlObject.prototype);
 
 /// IdlTypedef ///
 // Used for IdlArray.prototype.assert_type_is
 function IdlTypedef(obj)
-//@{
 {
     /**
      * obj is an object produced by the WebIDLParser.js "typedef"
      * production.
      */
 
     /** Self-explanatory. */
     this.name = obj.name;
 
     /** The idlType that we are supposed to be typedeffing to. */
     this.idlType = obj.idlType;
 
 }
-//@}
 
 IdlTypedef.prototype = Object.create(IdlObject.prototype);
 
 /// IdlNamespace ///
 function IdlNamespace(obj)
-//@{
 {
     this.name = obj.name;
     this.extAttrs = obj.extAttrs;
     this.untested = obj.untested;
     /** A back-reference to our IdlArray. */
     this.array = obj.array;
 
     /** An array of IdlInterfaceMembers. */
     this.members = obj.members.map(m => new IdlInterfaceMember(m));
 }
-//@}
 
 IdlNamespace.prototype = Object.create(IdlObject.prototype);
 
 IdlNamespace.prototype.do_member_operation_asserts = function (memberHolderObject, member, a_test)
-//@{
 {
     var desc = Object.getOwnPropertyDescriptor(memberHolderObject, member.name);
 
     assert_false("get" in desc, "property should not have a getter");
     assert_false("set" in desc, "property should not have a setter");
     assert_equals(
         desc.writable,
         !member.isUnforgeable,
@@ -3102,20 +2995,18 @@ IdlNamespace.prototype.do_member_operati
     assert_equals(
         memberHolderObject[member.name].length,
         minOverloadLength(this.members.filter(function(m) {
             return m.type == "operation" && m.name == member.name;
         })),
         "operation has wrong .length");
     a_test.done();
 }
-//@}
 
 IdlNamespace.prototype.test_member_operation = function(member)
-//@{
 {
     if (!shouldRunSubTest(this.name)) {
         return;
     }
     var args = member.arguments.map(function(a) {
         var s = a.idlType.idlType;
         if (a.variadic) {
             s += '...';
@@ -3130,20 +3021,18 @@ IdlNamespace.prototype.test_member_opera
         assert_own_property(
             self[this.name],
             member.name,
             'namespace object missing operation ' + format_value(member.name));
 
         this.do_member_operation_asserts(self[this.name], member, a_test);
     }.bind(this));
 };
-//@}
 
 IdlNamespace.prototype.test_member_attribute = function (member)
-//@{
 {
     if (!shouldRunSubTest(this.name)) {
         return;
     }
     var a_test = subsetTestByKey(
         this.name,
         async_test,
         this.name + ' namespace: attribute ' + member.name);
@@ -3154,20 +3043,18 @@ IdlNamespace.prototype.test_member_attri
             member.name,
             this.name + ' does not have property ' + format_value(member.name));
 
         var desc = Object.getOwnPropertyDescriptor(self[this.name], member.name);
         assert_equals(desc.set, undefined, "setter must be undefined for namespace members");
         a_test.done();
     }.bind(this));
 };
-//@}
 
 IdlNamespace.prototype.test = function ()
-//@{
 {
     /**
      * TODO(lukebjerring): Assert:
      * - "Note that unlike interfaces or dictionaries, namespaces do not create types."
      * - "Of the extended attributes defined in this specification, only the
      *     [Exposed] and [SecureContext] extended attributes are applicable to namespaces."
      * - "Namespaces must be annotated with the [Exposed] extended attribute."
      */
@@ -3183,17 +3070,16 @@ IdlNamespace.prototype.test = function (
             this.test_member_attribute(v);
             break;
 
         default:
             throw 'Invalid namespace member ' + v.name + ': ' + v.type + ' not supported';
         }
     };
 };
-//@}
 
 }());
 
 /**
  * idl_test is a promise_test wrapper that handles the fetching of the IDL,
  * avoiding repetitive boilerplate.
  *
  * @param {String|String[]} srcs Spec name(s) for source idl files (fetched from