tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

commit d3520d0b754f2197e54a941d68b4309911bf020b
parent 66963d1d1beffb0013793a50d012296a2d29f77d
Author: Sam Sneddon <gsnedders@apple.com>
Date:   Fri,  3 Oct 2025 08:59:26 +0000

Bug 1990958 [wpt PR 55077] - Create subtests for valid-custom-element-names.html, a=testonly

Automatic update from web-platform-tests
Create subtests for valid-custom-element-names.html

Instead of having a single subtest with thousands of assertions for
different names, split them up into individual subtests. This allows
for regression tracking at a per-name level, rather than a "did
everything pass" level.

--

wpt-commits: 02eb5c66092e6d46d239f59456d19a35b62b258d
wpt-pr: 55077

Diffstat:
Mtesting/web-platform/tests/custom-elements/registries/valid-custom-element-names.html | 29++++++++++++++---------------
1 file changed, 14 insertions(+), 15 deletions(-)

diff --git a/testing/web-platform/tests/custom-elements/registries/valid-custom-element-names.html b/testing/web-platform/tests/custom-elements/registries/valid-custom-element-names.html @@ -113,26 +113,25 @@ function createElementClass() { return newClass; } -promise_test(async t => { - for (const validName of validCustomElementNames) { - try { - const newClass = createElementClass(); - customElements.define(validName, newClass); - await customElements.whenDefined(validName); - } catch (error) { - assert_unreached(`Custom element name should have been valid but threw error: ${debugString(validName)} ${error.toString()}`); - } - } +for (const validName of validCustomElementNames) { + promise_test(async t => { + const newClass = createElementClass(); + customElements.define(validName, newClass); + await customElements.whenDefined(validName); + }, `Valid custom element name: ${debugString(validName)}`); +} - for (const invalidName of invalidCustomElementNames) { +for (const invalidName of invalidCustomElementNames) { + promise_test(async t => { const newClass = createElementClass(); assert_throws_dom( 'SyntaxError', () => customElements.define(invalidName, newClass), - `customElements.define should have thrown for invalid name: ${debugString(invalidName)}`); + `customElements.define should have thrown`); await promise_rejects_dom(t, 'SyntaxError', customElements.whenDefined(invalidName), - `customElements.whenDefined should have thrown for invalid name: ${debugString(invalidName)}`); - } -}); + `customElements.whenDefined should have thrown`); + }, `Invalid custom element name: ${debugString(invalidName)}`); +} + </script>