diff --git a/resources/idlharness.js b/resources/idlharness.js index 0c459c965d2bbe..c4caf4b7e1b5f3 100644 --- a/resources/idlharness.js +++ b/resources/idlharness.js @@ -603,6 +603,7 @@ IdlArray.prototype.assert_throws = function(error, idlArrayFunc) { try { idlArrayFunc.call(this, this); + throw new IdlHarnessError(`${idlArrayFunc} did not throw the expected IdlHarnessError`); } catch (e) { if (e instanceof AssertionError) { throw e; @@ -612,11 +613,9 @@ IdlArray.prototype.assert_throws = function(error, idlArrayFunc) error = error.message; } if (e.message !== error) { - throw new IdlHarnessError(`${idlArrayFunc} threw "${e}", not the expected IdlHarnessError "${error}"`); + throw new IdlHarnessError(`${idlArrayFunc} threw ${e}, not the expected IdlHarnessError`); } - return; } - throw new IdlHarnessError(`${idlArrayFunc} did not throw the expected IdlHarnessError`); } //@} @@ -683,16 +682,6 @@ IdlArray.prototype.test = function() } this["includes"] = {}; - // Assert B defined for A : B - for (var member of Object.values(this.members).filter(m => m.base)) { - let lhs = member.name; - let rhs = member.base; - if (!(lhs in this.members)) throw new IdlHarnessError(`${lhs} inherits ${rhs}, but ${lhs} is undefined.`); - if (!(this.members[lhs] instanceof IdlInterface)) throw new IdlHarnessError(`${lhs} inherits ${rhs}, but ${lhs} is not an interface.`); - if (!(rhs in this.members)) throw new IdlHarnessError(`${lhs} inherits ${rhs}, but ${rhs} is undefined.`); - if (!(this.members[rhs] instanceof IdlInterface)) throw new IdlHarnessError(`${lhs} inherits ${rhs}, but ${rhs} is not an interface.`); - } - Object.getOwnPropertyNames(this.members).forEach(function(memberName) { var member = this.members[memberName]; if (!(member instanceof IdlInterface)) { diff --git a/resources/test/tests/idlharness/IdlInterface/test_primary_interface_of_undefined.html b/resources/test/tests/idlharness/IdlInterface/test_primary_interface_of_undefined.html deleted file mode 100644 index 350e17bee66c81..00000000000000 --- a/resources/test/tests/idlharness/IdlInterface/test_primary_interface_of_undefined.html +++ /dev/null @@ -1,23 +0,0 @@ - - - - - idlharness test_primary_interface_of_undefined - - - - - - - - - -