Skip to content

Commit

Permalink
Don't test namespaces in idlharness if not exposed
Browse files Browse the repository at this point in the history
Instead, if a namespace is not exposed, test that there is no global
property of that name, similar to what we do with interfaces.
  • Loading branch information
ptomato committed Nov 23, 2024
1 parent 3b35e8c commit 529810f
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions resources/idlharness.js
Original file line number Diff line number Diff line change
Expand Up @@ -3451,6 +3451,17 @@ IdlNamespace.prototype.test_self = function ()

IdlNamespace.prototype.test = function ()
{
// If the namespace object is not exposed, only test that. Members can't be
// tested either
if (!this.exposed) {
if (!this.untested) {
subsetTestByKey(this.name, test, function() {
assert_false(this.name in self);
}.bind(this), this.name + " namespace: nonexistence of namespace object");
}
return;
}

if (!this.untested) {
this.test_self();
}
Expand Down

0 comments on commit 529810f

Please sign in to comment.