File
Blob: src/wpt/BUILD.bazel
| 1 | load("//:build/wd_ts_project.bzl", "wd_ts_project") |
| 2 | load("//:build/wpt_test.bzl", "wpt_test") |
| 3 | |
| 4 | srcs = glob( |
| 5 | [ |
| 6 | "**/*.ts", |
| 7 | ], |
| 8 | ) |
| 9 | |
| 10 | filegroup( |
| 11 | name = "harness@js", |
| 12 | srcs = [file.removesuffix(".ts") + ".js" for file in glob(["harness/*.ts"])], |
| 13 | ) |
| 14 | |
| 15 | wd_ts_project( |
| 16 | name = "wpt-all@tsproject", |
| 17 | srcs = srcs, |
| 18 | eslintrc_json = "eslint.config.mjs", |
| 19 | source_map = False, |
| 20 | tsconfig_json = "tsconfig.json", |
| 21 | deps = [ |
| 22 | "//:node_modules/@types/node", |
| 23 | ], |
| 24 | ) |
| 25 | |
| 26 | wpt_test( |
| 27 | name = "url", |
| 28 | config = "url-test.ts", |
| 29 | wpt_directory = "@wpt//:url@module", |
| 30 | ) |
| 31 | |
| 32 | wpt_test( |
| 33 | name = "urlpattern", |
| 34 | # We use a fixed compat date because new URLPattern implementation |
| 35 | # will be the default one on a later date. |
| 36 | compat_date = "2025-04-09", |
| 37 | config = "urlpattern-test.ts", |
| 38 | wpt_directory = "@wpt//:urlpattern@module", |
| 39 | ) |
| 40 | |
| 41 | wpt_test( |
| 42 | name = "urlpattern-standard", |
| 43 | config = "urlpattern-standard-test.ts", |
| 44 | wpt_directory = "@wpt//:urlpattern@module", |
| 45 | ) |
| 46 | |
| 47 | wpt_test( |
| 48 | name = "dom/abort", |
| 49 | config = "dom/abort-test.ts", |
| 50 | wpt_directory = "@wpt//:dom/abort@module", |
| 51 | ) |
| 52 | |
| 53 | wpt_test( |
| 54 | name = "dom/events", |
| 55 | config = "dom/events-test.ts", |
| 56 | wpt_directory = "@wpt//:dom/events@module", |
| 57 | ) |
| 58 | |
| 59 | wpt_test( |
| 60 | name = "fetch/api", |
| 61 | size = "large", |
| 62 | compat_flags = ["strip_bom_in_read_all_text"], |
| 63 | config = "fetch/api-test.ts", |
| 64 | start_server = True, |
| 65 | target_compatible_with = select({ |
| 66 | # TODO(later): Provide a Windows version of the sidecar script we wrote to invoke wptserve. |
| 67 | # Currently we only have a Unix shell script. |
| 68 | "@platforms//os:windows": ["@platforms//:incompatible"], |
| 69 | "//conditions:default": [], |
| 70 | }), |
| 71 | wpt_directory = "@wpt//:fetch/api@module", |
| 72 | ) |
| 73 | |
| 74 | wpt_test( |
| 75 | name = "encoding", |
| 76 | size = "large", |
| 77 | compat_flags = [ |
| 78 | "encoder_stream_spec_compliant_backpressure", |
| 79 | "fixup-transform-stream-backpressure", |
| 80 | "text_decoder_cjk_decoder", |
| 81 | "transformstream_enable_standard_constructor", |
| 82 | ], |
| 83 | config = "encoding-test.ts", |
| 84 | wpt_directory = "@wpt//:encoding@module", |
| 85 | ) |
| 86 | |
| 87 | wpt_test( |
| 88 | name = "compression", |
| 89 | config = "compression-test.ts", |
| 90 | start_server = True, |
| 91 | target_compatible_with = select({ |
| 92 | "@platforms//os:windows": ["@platforms//:incompatible"], |
| 93 | "//conditions:default": [], |
| 94 | }), |
| 95 | wpt_directory = "@wpt//:compression@module", |
| 96 | ) |
| 97 | |
| 98 | wpt_test( |
| 99 | name = "WebCryptoAPI", |
| 100 | size = "enormous", |
| 101 | compat_flags = ["disable_fast_jsg_struct"], |
| 102 | config = "WebCryptoAPI-test.ts", |
| 103 | target_compatible_with = select({ |
| 104 | # Too slow on Windows |
| 105 | "@platforms//os:windows": ["@platforms//:incompatible"], |
| 106 | "//conditions:default": [], |
| 107 | }), |
| 108 | wpt_directory = "@wpt//:WebCryptoAPI@module", |
| 109 | ) |
| 110 | |
| 111 | wpt_test( |
| 112 | name = "streams", |
| 113 | size = "large", |
| 114 | compat_flags = ["writable_stream_spec_compliant_writer"], |
| 115 | config = "streams-test.ts", |
| 116 | wpt_directory = "@wpt//:streams@module", |
| 117 | ) |
| 118 | |
| 119 | wpt_test( |
| 120 | name = "fs", |
| 121 | size = "large", |
| 122 | compat_flags = ["enable_web_file_system"], |
| 123 | config = "fs-test.ts", |
| 124 | wpt_directory = "@wpt//:fs@module", |
| 125 | ) |
| 126 | |
| 127 | wpt_test( |
| 128 | name = "performance-timeline", |
| 129 | config = "performance-timeline-test.ts", |
| 130 | wpt_directory = "@wpt//:performance-timeline@module", |
| 131 | ) |
| 132 | |
| 133 | wpt_test( |
| 134 | name = "websockets", |
| 135 | size = "large", |
| 136 | compat_flags = [ |
| 137 | "websocket_standard_binary_type", |
| 138 | "web_socket_auto_reply_to_close", |
| 139 | ], |
| 140 | config = "websockets-test.ts", |
| 141 | start_server = True, |
| 142 | target_compatible_with = select({ |
| 143 | # TODO(later): Provide a Windows version of the sidecar script we wrote to invoke wptserve. |
| 144 | # Currently we only have a Unix shell script. |
| 145 | "@platforms//os:windows": ["@platforms//:incompatible"], |
| 146 | "//conditions:default": [], |
| 147 | }), |
| 148 | wpt_directory = "@wpt//:websockets@module", |
| 149 | ) |
| 150 | |
| 151 | wpt_test( |
| 152 | name = "eventsource", |
| 153 | size = "large", |
| 154 | config = "eventsource-test.ts", |
| 155 | start_server = True, |
| 156 | target_compatible_with = select({ |
| 157 | # TODO(later): Provide a Windows version of the sidecar script we wrote to invoke wptserve. |
| 158 | # Currently we only have a Unix shell script. |
| 159 | "@platforms//os:windows": ["@platforms//:incompatible"], |
| 160 | "//conditions:default": [], |
| 161 | }), |
| 162 | wpt_directory = "@wpt//:eventsource@module", |
| 163 | ) |
| 164 | |
| 165 | wpt_test( |
| 166 | name = "webidl", |
| 167 | config = "webidl-test.ts", |
| 168 | wpt_directory = "@wpt//:webidl@module", |
| 169 | ) |