Skip to content

Commit

Permalink
Bug 1695738 [wpt PR 27845] - [testharness.js] Do not wrap assert_any …
Browse files Browse the repository at this point in the history
…in expose_assert, a=testonly

Automatic update from web-platform-tests
[testharness.js] Do not wrap assert_any in expose_assert

The assert tracking code cannot handle nested asserts. It ends up both
recording all the inner-asserts for assert_any (which is arguably
correct but also looks confusing since some fail), as well as not
properly recording the result for the `assert_any` itself (it overrides
the last inner-assert results instead - even more confusing!)

To workaround this quickly, do not wrap assert_any in the wrapper
script. This means it will not show up in the asserts run, though its
children will (but the last child will no longer have the wrong status).
This isn't perfect, but it's a quick fix.

Fixes web-platform-tests/wpt#27824

--

wpt-commits: f84f16ed68aa6edaf5c98806e9d5c139a26882a6
wpt-pr: 27845

UltraBlame original commit: ce07f752bf60169ada7502badf8dd33ff9b642aa
  • Loading branch information
marco-c committed Mar 15, 2021
1 parent b0d7565 commit fe545c2
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion testing/web-platform/tests/resources/testharness.js
Original file line number Diff line number Diff line change
Expand Up @@ -1929,7 +1929,10 @@
throw new AssertionError(errors.join("\n\n"));
}
}
expose_assert(assert_any, "assert_any");



expose(assert_any, "assert_any");



Expand Down

0 comments on commit fe545c2

Please sign in to comment.