n 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 invalidName of invalidCustomElementNames) {
    const newClass = createElementClass