Skip to content
File

Blob: src/wpt/dom/events-test.ts

typescript84 lines
1// Copyright (c) 2017-2022 Cloudflare, Inc.
2// Licensed under the Apache 2.0 license found in the LICENSE file or at:
3// https://opensource.org/licenses/Apache-2.0
4 
5import { type TestRunnerConfig } from 'harness/harness';
6 
7export default {
8 'AddEventListenerOptions-once.any.js': {},
9 'AddEventListenerOptions-passive.any.js': {
10 comment: 'TODO investigate this',
11 expectedFailures: [
12 'preventDefault should be ignored if-and-only-if the passive option is true',
13 'passive behavior of one listener should be unaffected by the presence of other listeners',
14 'Equivalence of option values',
15 'returnValue should be ignored if-and-only-if the passive option is true',
16 ],
17 },
18 'AddEventListenerOptions-signal.any.js': {
19 comment: 'capture is not relevant outside of the DOM',
20 omittedTests: [
21 'Passing an AbortSignal to addEventListener works with the capture flag',
22 ],
23 },
24 'Event-constructors.any.js': {
25 comment: 'We force timeStamp to 0.0 to avoid timing side-channels',
26 expectedFailures: [/^$/],
27 },
28 'Event-dispatch-listener-order.window.js': {
29 comment: 'Test requires DOM',
30 // There is a single test, whose name is the empty string
31 omittedTests: [''],
32 },
33 'Event-isTrusted.any.js': {
34 comment: 'isTrusted must be an own property, not a prototype property',
35 // With the pedantic_wpt compat flag we actually set the isTrusted property
36 // to be an own property. However, it's an own property that uses a value
37 // in the descriptor rather than a getter and the test is specifically looking
38 // for a getter for some reason. That's way more pedantic than we want to
39 // deal with so just omit the test for now.
40 omittedTests: [''],
41 },
42 'EventListener-addEventListener.sub.window.js': {
43 comment: 'Only relevant to browsers',
44 omittedTests: [
45 "EventListener.addEventListener doesn't throw when a cross origin object is passed in.",
46 ],
47 },
48 'EventTarget-add-remove-listener.any.js': {},
49 'EventTarget-addEventListener.any.js': {},
50 'EventTarget-constructible.any.js': {},
51 'EventTarget-removeEventListener.any.js': {
52 comment: 'capture is not relevant outside of the DOM',
53 expectedFailures: ['removing a null event listener should succeed'],
54 },
55 'event-global-extra.window.js': {
56 comment: 'Test is DOM-specific',
57 disabledTests: true,
58 },
59 'event-global-set-before-handleEvent-lookup.window.js': {
60 comment: 'window is not defined',
61 expectedFailures: ["window.event is set before 'handleEvent' lookup"],
62 },
63 'event-global.worker.js': {
64 comment: 'ReferenceError: importScripts is not defined',
65 disabledTests: true,
66 },
67 'legacy-pre-activation-behavior.window.js': {
68 comment: 'Only relevant to browsers',
69 omittedTests: ['Use NONE phase during legacy-pre-activation behavior'],
70 },
71 'relatedTarget.window.js': {
72 comment: 'Test is DOM-specific',
73 omittedTests: true,
74 },
75 'scrolling/scroll_support.js': {
76 comment: 'Only used by HTML files',
77 omittedTests: true,
78 },
79 'scrolling/scrollend-user-scroll-common.js': {
80 comment: 'Only used by HTML files',
81 omittedTests: true,
82 },
83} satisfies TestRunnerConfig;