interop-accessibility icon indicating copy to clipboard operation
interop-accessibility copied to clipboard

Writing conditional or browser-specific tests

Open rahimabdi opened this issue 1 year ago • 0 comments

All of our tests currently run across browsers but I'm curious if it's possible to:

  • Write an engine-specific test (obviously this would be something that is a MAY/SHOULD in spec since all engines would be subject to MUST rules)

  • Write a test that runs only if a condition is met. For example, we know that engines MAY surface a computedrole when "...host language elements do not have an exact or equivalent mapping to a valid, non-abstract role" (e.g., <video> returns html-video but putting role="html-video" on an element is forbidden); here, where supported, we could test that a browser is enforcing ignoring of an " abstract or invalid role token" but only if computedrole returns something for <video> albeit not required. If this is possible, it means that a test may or may not show up in the CI results (and not sure if testharness supports this type of fuzzy test since assertions result only in true or false and assertion errors halt test execution)

rahimabdi avatar Apr 27 '24 20:04 rahimabdi