Bug 1450377 [wpt PR 10259] - Revert #10240, a=testonly
authorLuke Bjerring <lukebjerring@users.noreply.github.com>
Mon, 09 Apr 2018 21:25:12 +0000
changeset 467236 5cbc82f2f03c60af195ae009be4dafd196a2f4ed
parent 467235 aae6dfb2668175bad94948510ad25401b3597d7d
child 467237 0f45dceb7d6537805511af50be8820860f44d640
push id9165
push userasasaki@mozilla.com
push dateThu, 26 Apr 2018 21:04:54 +0000
treeherdermozilla-beta@064c3804de2e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstestonly
bugs1450377, 10259, 10240
milestone61.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 1450377 [wpt PR 10259] - Revert #10240, a=testonly Automatic update from web-platform-testsRevert #10240 wpt-commits: 21be95d42621e2f7f4e2a211ce9d4a50d925aa73 wpt-pr: 10259 wpt-commits: 21be95d42621e2f7f4e2a211ce9d4a50d925aa73 wpt-pr: 10259
testing/web-platform/tests/resources/idlharness.js
testing/web-platform/tests/resources/test/tests/idlharness/IdlInterface/test_primary_interface_of_undefined.html
--- a/testing/web-platform/tests/resources/idlharness.js
+++ b/testing/web-platform/tests/resources/idlharness.js
@@ -598,30 +598,29 @@ function exposed_in(globals) {
  * @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);
+        throw new IdlHarnessError(`${idlArrayFunc} did not throw the expected IdlHarnessError`);
     } catch (e) {
         if (e instanceof AssertionError) {
             throw e;
         }
         // Assertions for behaviour of the idlharness.js engine.
         if (error instanceof IdlHarnessError) {
             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`);
 }
 
 //@}
 IdlArray.prototype.test = function()
 //@{
 {
     /** Entry point.  See documentation at beginning of file. */
 
@@ -678,26 +677,16 @@ IdlArray.prototype.test = function()
             this.members[rhs].members.forEach(function(member)
             {
                 this.members[lhs].members.push(new IdlInterfaceMember(member));
             }.bind(this));
         }.bind(this));
     }
     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)) {
             return;
         }
 
         var globals = exposure_set(member, ["Window"]);
         member.exposed = exposed_in(globals);
deleted file mode 100644
--- a/testing/web-platform/tests/resources/test/tests/idlharness/IdlInterface/test_primary_interface_of_undefined.html
+++ /dev/null
@@ -1,23 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-
-<head>
-  <title>idlharness test_primary_interface_of_undefined</title>
-</head>
-
-<body>
-  <script src="/resources/testharness.js"></script>
-  <script src="/resources/WebIDLParser.js"></script>
-  <script src="/resources/idlharness.js"></script>
-  <script>
-    'use strict';
-
-    test(function () {
-      let i = new IdlArray();
-      i.add_untested_idls('interface A : B {};');
-      i.assert_throws(new IdlHarnessError('A inherits B, but B is undefined.'), i => i.test());
-    }, 'A : B with B undeclared should throw IdlHarnessError');
-  </script>
-</body>
-
-</html>