Randolf | b0fe9c1 | 2023-03-06 14:03:48 | [diff] [blame] | 1 | # WebDriver BiDi for Chromium [](https://www.npmjs.com/package/chromium-bidi) |
| 2 | |
Randolf | 5543146 | 2023-03-29 13:00:36 | [diff] [blame] | 3 | ## CI status |
Randolf | b0fe9c1 | 2023-03-06 14:03:48 | [diff] [blame] | 4 | |
Randolf | 5543146 | 2023-03-29 13:00:36 | [diff] [blame] | 5 |  |
| 6 |  |
Randolf Jung | bcb3bc8 | 2023-06-26 16:30:14 | [diff] [blame] | 7 |  |
Randolf | 5543146 | 2023-03-29 13:00:36 | [diff] [blame] | 8 | |
Randolf | 5543146 | 2023-03-29 13:00:36 | [diff] [blame] | 9 |  |
Randolf | b0fe9c1 | 2023-03-06 14:03:48 | [diff] [blame] | 10 | |
Randolf Jung | 3e52631 | 2023-08-08 06:20:39 | [diff] [blame] | 11 | [](https://codecov.io/gh/GoogleChromeLabs/chromium-bidi) |
| 12 | |
Randolf | b0fe9c1 | 2023-03-06 14:03:48 | [diff] [blame] | 13 | This is an implementation of the |
| 14 | [WebDriver BiDi](https://w3c.github.io/webdriver-bidi/) protocol with some |
| 15 | extensions (**BiDi+**) |
| 16 | for Chromium, implemented as a JavaScript layer translating between BiDi and CDP, |
| 17 | running inside a Chrome tab. |
| 18 | |
| 19 | Current status can be checked |
| 20 | at [WPT WebDriver BiDi status](https://wpt.fyi/results/webdriver/tests/bidi). |
| 21 | |
| 22 | ## BiDi+ |
| 23 | |
| 24 | **"BiDi+"** is an extension of the WebDriver BiDi protocol. In addition to [WebDriver BiDi](https://w3c.github.io/webdriver-bidi/) it has: |
| 25 | |
| 26 | ### Command `cdp.sendCommand` |
| 27 | |
| 28 | ```cddl |
| 29 | CdpSendCommandCommand = { |
| 30 | method: "cdp.sendCommand", |
| 31 | params: ScriptEvaluateParameters, |
| 32 | } |
| 33 | |
| 34 | CdpSendCommandParameters = { |
Alex Rudenko | 1552f2b | 2023-07-11 11:18:32 | [diff] [blame] | 35 | method: text, |
| 36 | params: any, |
| 37 | session?: text, |
Randolf | b0fe9c1 | 2023-03-06 14:03:48 | [diff] [blame] | 38 | } |
| 39 | |
| 40 | CdpSendCommandResult = { |
| 41 | result: any, |
Alex Rudenko | 1552f2b | 2023-07-11 11:18:32 | [diff] [blame] | 42 | session: text, |
Randolf | b0fe9c1 | 2023-03-06 14:03:48 | [diff] [blame] | 43 | } |
| 44 | ``` |
| 45 | |
| 46 | The command runs the |
| 47 | described [CDP command](https://chromedevtools.github.io/devtools-protocol) |
Alex Rudenko | 1552f2b | 2023-07-11 11:18:32 | [diff] [blame] | 48 | and returns the result. |
Randolf | b0fe9c1 | 2023-03-06 14:03:48 | [diff] [blame] | 49 | |
| 50 | ### Command `cdp.getSession` |
| 51 | |
| 52 | ```cddl |
| 53 | CdpGetSessionCommand = { |
| 54 | method: "cdp.sendCommand", |
| 55 | params: ScriptEvaluateParameters, |
| 56 | } |
| 57 | |
| 58 | CdpGetSessionParameters = { |
| 59 | context: BrowsingContext, |
| 60 | } |
| 61 | |
| 62 | CdpGetSessionResult = { |
Alex Rudenko | 1552f2b | 2023-07-11 11:18:32 | [diff] [blame] | 63 | session: text, |
Randolf | b0fe9c1 | 2023-03-06 14:03:48 | [diff] [blame] | 64 | } |
| 65 | ``` |
| 66 | |
| 67 | The command returns the default CDP session for the selected browsing context. |
| 68 | |
Alex Rudenko | 1552f2b | 2023-07-11 11:18:32 | [diff] [blame] | 69 | ### Events `cdp` |
Randolf | b0fe9c1 | 2023-03-06 14:03:48 | [diff] [blame] | 70 | |
| 71 | ```cddl |
| 72 | CdpEventReceivedEvent = { |
Alex Rudenko | 1552f2b | 2023-07-11 11:18:32 | [diff] [blame] | 73 | method: "cdp.<CDP Event Name>", |
| 74 | params: CdpEventReceivedParameters, |
Randolf | b0fe9c1 | 2023-03-06 14:03:48 | [diff] [blame] | 75 | } |
| 76 | |
| 77 | CdpEventReceivedParameters = { |
Alex Rudenko | 1552f2b | 2023-07-11 11:18:32 | [diff] [blame] | 78 | event: text, |
| 79 | params: any, |
| 80 | session: text, |
Randolf | b0fe9c1 | 2023-03-06 14:03:48 | [diff] [blame] | 81 | } |
| 82 | ``` |
| 83 | |
| 84 | The event contains a CDP event. |
| 85 | |
| 86 | ### Field `channel` |
| 87 | |
| 88 | Each command can be extended with a `channel`: |
| 89 | |
| 90 | ```cddl |
| 91 | Command = { |
| 92 | id: js-uint, |
| 93 | channel?: text, |
| 94 | CommandData, |
| 95 | Extensible, |
| 96 | } |
| 97 | ``` |
| 98 | |
| 99 | If provided and non-empty string, the very same `channel` is added to the response: |
| 100 | |
| 101 | ```cddl |
| 102 | CommandResponse = { |
| 103 | id: js-uint, |
| 104 | channel?: text, |
| 105 | result: ResultData, |
| 106 | Extensible, |
| 107 | } |
| 108 | |
| 109 | ErrorResponse = { |
| 110 | id: js-uint / null, |
| 111 | channel?: text, |
| 112 | error: ErrorCode, |
| 113 | message: text, |
| 114 | ?stacktrace: text, |
| 115 | Extensible |
| 116 | } |
| 117 | ``` |
| 118 | |
| 119 | When client uses |
| 120 | commands [`session.subscribe`](https://w3c.github.io/webdriver-bidi/#command-session-subscribe) |
| 121 | and [`session.unsubscribe`](https://w3c.github.io/webdriver-bidi/#command-session-unsubscribe) |
| 122 | with `channel`, the subscriptions are handled per channel, and the corresponding |
| 123 | `channel` filed is added to the event message: |
| 124 | |
| 125 | ```cddl |
| 126 | Event = { |
| 127 | channel?: text, |
| 128 | EventData, |
| 129 | Extensible, |
| 130 | } |
| 131 | ``` |
| 132 | |
| 133 | ## Dev Setup |
| 134 | |
| 135 | ### `npm` |
| 136 | |
| 137 | This is a Node.js project, so install dependencies as usual: |
| 138 | |
| 139 | ```sh |
| 140 | npm install |
| 141 | ``` |
| 142 | |
Randolf Jung | 3e52631 | 2023-08-08 06:20:39 | [diff] [blame] | 143 | ### `cargo` |
| 144 | |
| 145 | <!-- TODO(jrandolf): Remove after binaries get published --> |
| 146 | |
Alex Rudenko | 662ce9c | 2023-08-29 08:05:30 | [diff] [blame] | 147 | We use [cddlconv](https://github.com/google/cddlconv) to generate our WebDriverBidi types before building. |
Randolf Jung | 3e52631 | 2023-08-08 06:20:39 | [diff] [blame] | 148 | |
| 149 | 1. Install [Rust](https://rustup.rs/). |
Alex Rudenko | 662ce9c | 2023-08-29 08:05:30 | [diff] [blame] | 150 | 2. Run `cargo install --git https://github.com/google/cddlconv.git cddlconv` |
Randolf Jung | 3e52631 | 2023-08-08 06:20:39 | [diff] [blame] | 151 | |
Randolf | b0fe9c1 | 2023-03-06 14:03:48 | [diff] [blame] | 152 | ### pre-commit.com integration |
| 153 | |
| 154 | Refer to the documentation at [.pre-commit-config.yaml](.pre-commit-config.yaml). |
| 155 | |
| 156 | ### Starting the Server |
| 157 | |
| 158 | This will run the server on port `8080`: |
| 159 | |
| 160 | ```sh |
| 161 | npm run server |
| 162 | ``` |
| 163 | |
| 164 | Use the `PORT=` environment variable or `--port=` argument to run it on another port: |
| 165 | |
| 166 | ```sh |
| 167 | PORT=8081 npm run server |
| 168 | npm run server -- --port=8081 |
| 169 | ``` |
| 170 | |
| 171 | Use the `DEBUG` environment variable to see debug info: |
| 172 | |
| 173 | ```sh |
| 174 | DEBUG=* npm run server |
| 175 | ``` |
| 176 | |
Alex Rudenko | 5fe99f8 | 2023-10-06 12:01:27 | [diff] [blame^] | 177 | Use the `DEBUG_DEPTH` (default: `10`) environment variable to see debug deeply nested objects: |
| 178 | |
| 179 | ```sh |
| 180 | DEBUG_DEPTH=100 DEBUG=* npm run server |
| 181 | ``` |
| 182 | |
Randolf | b0fe9c1 | 2023-03-06 14:03:48 | [diff] [blame] | 183 | Use the CLI argument `--headless=false` to run browser in headful mode: |
| 184 | |
| 185 | ```sh |
| 186 | npm run server -- --headless=false |
| 187 | ``` |
| 188 | |
| 189 | Use the `CHANNEL=...` environment variable or `--channel=...` argument with one of |
Randolf | 5543146 | 2023-03-29 13:00:36 | [diff] [blame] | 190 | the following values to run the specific Chrome channel: `stable`, |
| 191 | `beta`, `canary`, `dev`. |
Randolf | b0fe9c1 | 2023-03-06 14:03:48 | [diff] [blame] | 192 | |
| 193 | The requested Chrome version should be installed. |
| 194 | |
| 195 | ```sh |
Randolf | 5543146 | 2023-03-29 13:00:36 | [diff] [blame] | 196 | CHANNEL=dev npm run server |
| 197 | npm run server -- --channel=dev |
| 198 | ``` |
| 199 | |
Alex Rudenko | 1552f2b | 2023-07-11 11:18:32 | [diff] [blame] | 200 | Use the CLI argument `--verbose` to have CDP events printed to the console. Note: you have to enable debugging output `bidi:mapper:debug:*` as well. |
Randolf | 5543146 | 2023-03-29 13:00:36 | [diff] [blame] | 201 | |
| 202 | ```sh |
Alex Rudenko | 1552f2b | 2023-07-11 11:18:32 | [diff] [blame] | 203 | DEBUG=bidi:mapper:debug:* npm run server -- --verbose |
Randolf | 5543146 | 2023-03-29 13:00:36 | [diff] [blame] | 204 | ``` |
| 205 | |
| 206 | or |
| 207 | |
| 208 | ```sh |
| 209 | DEBUG=* npm run server -- --verbose |
Randolf | b0fe9c1 | 2023-03-06 14:03:48 | [diff] [blame] | 210 | ``` |
| 211 | |
| 212 | ### Starting on Linux and Mac |
| 213 | |
Randolf Jung | bcb3bc8 | 2023-06-26 16:30:14 | [diff] [blame] | 214 | TODO: verify it works on Windows. |
Randolf | b0fe9c1 | 2023-03-06 14:03:48 | [diff] [blame] | 215 | |
Randolf Jung | 3e52631 | 2023-08-08 06:20:39 | [diff] [blame] | 216 | You can also run the server by using `npm run server`. It will write |
Randolf | b0fe9c1 | 2023-03-06 14:03:48 | [diff] [blame] | 217 | output to the file `log.txt`: |
| 218 | |
| 219 | ```sh |
Randolf Jung | 3e52631 | 2023-08-08 06:20:39 | [diff] [blame] | 220 | npm run server -- --port=8081 --headless=false |
Randolf | b0fe9c1 | 2023-03-06 14:03:48 | [diff] [blame] | 221 | ``` |
| 222 | |
Alex Rudenko | 5fe99f8 | 2023-10-06 12:01:27 | [diff] [blame^] | 223 | ### Running with in other project |
| 224 | |
| 225 | Sometimes it good to verify that a change will not affect thing downstream for other packages. |
| 226 | There is a useful `puppeteer` label you can add to any PR to run Puppeteer test with your changes. |
| 227 | It will bundle `chromium-bidi` and install it in Puppeteer project then run that package test. |
| 228 | |
Randolf | b0fe9c1 | 2023-03-06 14:03:48 | [diff] [blame] | 229 | ## Running |
| 230 | |
| 231 | ### Unit tests |
| 232 | |
| 233 | Running: |
| 234 | |
| 235 | ```sh |
Randolf Jung | bcb3bc8 | 2023-06-26 16:30:14 | [diff] [blame] | 236 | npm run unit |
Randolf | b0fe9c1 | 2023-03-06 14:03:48 | [diff] [blame] | 237 | ``` |
| 238 | |
| 239 | ### E2E tests |
| 240 | |
| 241 | The E2E tests are written using Python, in order to learn how to eventually do |
| 242 | this in web-platform-tests. |
| 243 | |
Alex Rudenko | 5fe99f8 | 2023-10-06 12:01:27 | [diff] [blame^] | 244 | #### Installation |
Randolf | b0fe9c1 | 2023-03-06 14:03:48 | [diff] [blame] | 245 | |
| 246 | Python 3.6+ and some dependencies are required: |
| 247 | |
| 248 | ```sh |
| 249 | python3 -m pip install --user -r tests/requirements.txt |
| 250 | ``` |
| 251 | |
Alex Rudenko | 5fe99f8 | 2023-10-06 12:01:27 | [diff] [blame^] | 252 | #### Running |
Randolf | b0fe9c1 | 2023-03-06 14:03:48 | [diff] [blame] | 253 | |
| 254 | The E2E tests require BiDi server running on the same host. By default, tests |
| 255 | try to connect to the port `8080`. The server can be run from the project root: |
| 256 | |
| 257 | ```sh |
Randolf Jung | bcb3bc8 | 2023-06-26 16:30:14 | [diff] [blame] | 258 | npm run e2e # alias to to e2e-headless |
| 259 | npm run e2e-headful |
| 260 | npm run e2e-headless |
Randolf | b0fe9c1 | 2023-03-06 14:03:48 | [diff] [blame] | 261 | ``` |
| 262 | |
| 263 | Use the `PORT` environment variable to connect to another port: |
| 264 | |
| 265 | ```sh |
| 266 | PORT=8081 npm run e2e |
| 267 | ``` |
| 268 | |
Alex Rudenko | 5fe99f8 | 2023-10-06 12:01:27 | [diff] [blame^] | 269 | #### Examples |
Randolf | b0fe9c1 | 2023-03-06 14:03:48 | [diff] [blame] | 270 | |
| 271 | Refer to [examples/README.md](examples/README.md). |
| 272 | |
| 273 | ## WPT (Web Platform Tests) |
| 274 | |
| 275 | WPT is added as |
| 276 | a [git submodule](https://git-scm.com/book/en/v2/Git-Tools-Submodules). To get run |
| 277 | WPT tests: |
| 278 | |
| 279 | ### Check out and setup WPT |
| 280 | |
| 281 | #### 1. Check out WPT |
| 282 | |
| 283 | ```sh |
| 284 | git submodule update --init |
| 285 | ``` |
| 286 | |
| 287 | #### 2. Go to the WPT folder |
| 288 | |
| 289 | ```sh |
| 290 | cd wpt |
| 291 | ``` |
| 292 | |
| 293 | #### 3. Set up virtualenv |
| 294 | |
| 295 | Follow the [_System |
| 296 | Setup_](https://web-platform-tests.org/running-tests/from-local-system.html#system-setup) |
| 297 | instructions. |
| 298 | |
| 299 | #### 4. Setup `hosts` file |
| 300 | |
| 301 | Follow |
| 302 | the [`hosts` File Setup](https://web-platform-tests.org/running-tests/from-local-system.html#hosts-file-setup) |
| 303 | instructions. |
| 304 | |
| 305 | ##### 4.a On Linux, macOS or other UNIX-like system |
| 306 | |
| 307 | ```sh |
| 308 | ./wpt make-hosts-file | sudo tee -a /etc/hosts |
| 309 | ``` |
| 310 | |
| 311 | ##### 4.b On **Windows** |
| 312 | |
| 313 | This must be run in a PowerShell session with Administrator privileges: |
| 314 | |
| 315 | ```sh |
| 316 | python wpt make-hosts-file | Out-File $env:SystemRoot\System32\drivers\etc\hosts -Encoding ascii -Append |
| 317 | ``` |
| 318 | |
| 319 | If you are behind a proxy, you also need to make sure the domains above are excluded |
| 320 | from your proxy lookups. |
| 321 | |
Randolf Jung | bcb3bc8 | 2023-06-26 16:30:14 | [diff] [blame] | 322 | #### 5. Set `BROWSER_BIN` |
Randolf | b0fe9c1 | 2023-03-06 14:03:48 | [diff] [blame] | 323 | |
Randolf Jung | bcb3bc8 | 2023-06-26 16:30:14 | [diff] [blame] | 324 | Set the `BROWSER_BIN` environment variable to a Chrome, Edge or Chromium binary to launch. |
Randolf | b0fe9c1 | 2023-03-06 14:03:48 | [diff] [blame] | 325 | For example, on macOS: |
| 326 | |
| 327 | ```sh |
| 328 | # Chrome |
Randolf Jung | bcb3bc8 | 2023-06-26 16:30:14 | [diff] [blame] | 329 | export BROWSER_BIN="/Applications/Google Chrome Canary.app/Contents/MacOS/Google Chrome Canary" |
| 330 | export BROWSER_BIN="/Applications/Google Chrome Dev.app/Contents/MacOS/Google Chrome Dev" |
| 331 | export BROWSER_BIN="/Applications/Google Chrome Beta.app/Contents/MacOS/Google Chrome Beta" |
| 332 | export BROWSER_BIN="/Applications/Google Chrome.app/Contents/MacOS/Google Chrome" |
| 333 | export BROWSER_BIN="/Applications/Chromium.app/Contents/MacOS/Chromium" |
Randolf | b0fe9c1 | 2023-03-06 14:03:48 | [diff] [blame] | 334 | |
| 335 | # Edge |
Randolf Jung | bcb3bc8 | 2023-06-26 16:30:14 | [diff] [blame] | 336 | export BROWSER_BIN="/Applications/Microsoft Edge Canary.app/Contents/MacOS/Microsoft Edge Canary" |
| 337 | export BROWSER_BIN="/Applications/Microsoft Edge.app/Contents/MacOS/Microsoft Edge" |
Randolf | b0fe9c1 | 2023-03-06 14:03:48 | [diff] [blame] | 338 | ``` |
| 339 | |
| 340 | ### Run WPT tests |
| 341 | |
| 342 | #### 1. Make sure you have Chrome Dev installed |
| 343 | |
| 344 | https://www.google.com/chrome/dev/ |
| 345 | |
Randolf | 5543146 | 2023-03-29 13:00:36 | [diff] [blame] | 346 | #### 2. Build Chromedriver BiDi |
Randolf | b0fe9c1 | 2023-03-06 14:03:48 | [diff] [blame] | 347 | |
| 348 | Oneshot: |
| 349 | |
| 350 | ```sh |
| 351 | npm run build |
| 352 | ``` |
| 353 | |
| 354 | Continuously: |
| 355 | |
| 356 | ```sh |
Randolf Jung | bcb3bc8 | 2023-06-26 16:30:14 | [diff] [blame] | 357 | npm run build --watch |
Randolf | b0fe9c1 | 2023-03-06 14:03:48 | [diff] [blame] | 358 | ``` |
| 359 | |
| 360 | #### 3. Run |
| 361 | |
| 362 | ```sh |
Randolf Jung | bcb3bc8 | 2023-06-26 16:30:14 | [diff] [blame] | 363 | npm run wpt -- webdriver/tests/bidi/ |
Randolf | b0fe9c1 | 2023-03-06 14:03:48 | [diff] [blame] | 364 | ``` |
| 365 | |
| 366 | ### Update WPT expectations if needed |
| 367 | |
Randolf | b0fe9c1 | 2023-03-06 14:03:48 | [diff] [blame] | 368 | ```sh |
Randolf Jung | bcb3bc8 | 2023-06-26 16:30:14 | [diff] [blame] | 369 | UPDATE_EXPECTATIONS=true npm run wpt -- webdriver/tests/bidi/ |
Randolf | b0fe9c1 | 2023-03-06 14:03:48 | [diff] [blame] | 370 | ``` |
| 371 | |
| 372 | ## How does it work? |
| 373 | |
| 374 | The architecture is described in the |
| 375 | [WebDriver BiDi in Chrome Context implementation plan](https://docs.google.com/document/d/1VfQ9tv0wPSnb5TI-MOobjoQ5CXLnJJx9F_PxOMQc8kY) |
| 376 | . |
| 377 | |
| 378 | There are 2 main modules: |
| 379 | |
| 380 | 1. backend WS server in `src`. It runs webSocket server, and for each ws connection |
| 381 | runs an instance of browser with BiDi Mapper. |
| 382 | 2. front-end BiDi Mapper in `src/bidiMapper`. Gets BiDi commands from the backend, |
| 383 | and map them to CDP commands. |
| 384 | |
Alex Rudenko | 5fe99f8 | 2023-10-06 12:01:27 | [diff] [blame^] | 385 | ## Contributing |
Randolf | b0fe9c1 | 2023-03-06 14:03:48 | [diff] [blame] | 386 | |
| 387 | The BiDi commands are processed in the `src/bidiMapper/commandProcessor.ts`. To add a |
| 388 | new command, add it to `_processCommand`, write and call processor for it. |
| 389 | |
| 390 | ### Publish new `npm` release |
| 391 | |
Alex Rudenko | 1552f2b | 2023-07-11 11:18:32 | [diff] [blame] | 392 | #### Automatic release |
Randolf Jung | bcb3bc8 | 2023-06-26 16:30:14 | [diff] [blame] | 393 | |
Alex Rudenko | 1552f2b | 2023-07-11 11:18:32 | [diff] [blame] | 394 | We use [release-please](https://github.com/googleapis/release-please) to automate releases. When a release should be done, check for the release PR in our [pull requests](https://github.com/GoogleChromeLabs/chromium-bidi/pulls) and merge it. |
Randolf Jung | bcb3bc8 | 2023-06-26 16:30:14 | [diff] [blame] | 395 | |
| 396 | #### Manual release |
| 397 | |
| 398 | 1. Dry-run |
| 399 | |
| 400 | ```sh |
| 401 | npm publish --dry-run |
| 402 | ``` |
| 403 | |
Randolf | 5543146 | 2023-03-29 13:00:36 | [diff] [blame] | 404 | 1. Open a PR bumping the chromium-bidi version number in `package.json` for review: |
Randolf | b0fe9c1 | 2023-03-06 14:03:48 | [diff] [blame] | 405 | |
| 406 | ```sh |
Alex Rudenko | 1552f2b | 2023-07-11 11:18:32 | [diff] [blame] | 407 | npm version patch -m 'chore: Release v%s' --no-git-tag-version |
Randolf | b0fe9c1 | 2023-03-06 14:03:48 | [diff] [blame] | 408 | ``` |
| 409 | |
| 410 | Instead of `patch`, use `minor` or `major` [as needed](https://semver.org/). |
| 411 | |
Randolf | 5543146 | 2023-03-29 13:00:36 | [diff] [blame] | 412 | 1. After the PR is reviewed, [create a GitHub release](https://github.com/GoogleChromeLabs/chromium-bidi/releases/new) specifying the tag name matching the bumped version. |
| 413 | Our CI then automatically publishes the new release to npm based on the tag name. |
Randolf Jung | 3e52631 | 2023-08-08 06:20:39 | [diff] [blame] | 414 | |
| 415 | #### Roll into Chromium |
| 416 | |
Alex Rudenko | b013f87 | 2023-09-29 05:56:03 | [diff] [blame] | 417 | This section assumes you already have a Chromium set-up locally, |
| 418 | and knowledge on [how to submit changes to the repo](https://chromium.googlesource.com/chromium/src/+/refs/heads/main/docs/contributing.md). |
| 419 | Otherwise submit an issue for a project maintainer. |
Randolf Jung | 3e52631 | 2023-08-08 06:20:39 | [diff] [blame] | 420 | |
Alex Rudenko | b013f87 | 2023-09-29 05:56:03 | [diff] [blame] | 421 | 1. Create a new branch in chromium `src/`. |
| 422 | 2. Update the mapper version: |
Randolf Jung | 3e52631 | 2023-08-08 06:20:39 | [diff] [blame] | 423 | |
Alex Rudenko | b013f87 | 2023-09-29 05:56:03 | [diff] [blame] | 424 | ```shell |
| 425 | third_party/bidimapper/pull.sh |
| 426 | third_party/bidimapper/build.sh |
Randolf Jung | 3e52631 | 2023-08-08 06:20:39 | [diff] [blame] | 427 | ``` |
| 428 | |
Alex Rudenko | b013f87 | 2023-09-29 05:56:03 | [diff] [blame] | 429 | 3. Submit a CL with bug `chromedriver:4226`. |
| 430 | 4. [Regenerate WPT expectations metadata](https://chromium.googlesource.com/chromium/src/+/HEAD/docs/testing/web_platform_tests_wptrunner.md#updating-expectations): |
| 431 | |
| 432 | 4.1. Trigger a build and test run: |
| 433 | |
| 434 | ```shell |
| 435 | third_party/blink/tools/blink_tool.py update-metadata --build="linux-blink-rel" |
| 436 | ``` |
| 437 | |
| 438 | 4.2. Once the test completes on the builder, rerun that command to update the metadata. |
| 439 | Commit the changes (if any), and upload the new patch to the CL. |
| 440 | |
| 441 | 5. Add appropriate reviewers or comment the CL link on the PR. |