[wptrunner] Fix documentation formatting
Reformat the table of properties so Gitiles renders it (Chromium's
Gitiles does not render HTML, unlike `md_browser.py`).
Bug: 1356318, 1299650
Test: Check Gerrit's page rendering
Change-Id: I3ba2f38d6e7dd4eb9255aa77371697e663178f80
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3924115
Commit-Queue: Weizhong Xia <[email protected]>
Auto-Submit: Jonathan Lee <[email protected]>
Reviewed-by: Weizhong Xia <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1052115}
diff --git a/docs/testing/web_platform_tests_wptrunner.md b/docs/testing/web_platform_tests_wptrunner.md
index 8d56f638..0645edde 100644
--- a/docs/testing/web_platform_tests_wptrunner.md
+++ b/docs/testing/web_platform_tests_wptrunner.md
@@ -1,4 +1,4 @@
-# Using `wptrunner` in Chromium (experimental)
+# Using wptrunner in Chromium (experimental)
[`wptrunner`](https://github.com/web-platform-tests/wpt/tree/master/tools/wptrunner)
is the harness shipped with the WPT project for running the test suite. This
@@ -39,13 +39,13 @@
[`//third_party/blink/tools/run_wpt_tests.py`](https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/tools/run_wpt_tests.py).
First, build the necessary ninja target:
-```shell
+``` sh
autoninja -C out/Release wpt_tests_isolate_content_shell
```
To run the script, run the command below from `//third_party/blink/tools`:
-```shell
+``` sh
./run_wpt_tests.py [test list]
```
@@ -119,7 +119,7 @@
Metadata files record test and subtest expectations in a structured INI-like
text format:
-```ini
+```
[my-test.html]
expected: OK
bug: crbug.com/123 # Comments start with '#'
@@ -190,59 +190,14 @@
environment](https://firefox-source-docs.mozilla.org/build/buildsystem/mozinfo.html).
Properties available in Chromium are shown below:
-<table>
- <tr>
- <th>Property</th>
- <th>Type</th>
- <th>Description</th>
- <th colspan="2">Choices</th>
- </tr>
- <tr>
- <td><code>os</code></td>
- <td><code>str</code></td>
- <td>OS family</td>
- <td><code>linux</code></td>
- <td><code>android</code></td>
- </tr>
- <tr>
- <td><code>version</code></td>
- <td><code>str</code></td>
- <td>OS version</td>
- <td><code>trusty</code></td>
- <td><code>9</code></td>
- </tr>
- <tr>
- <td><code>product</code></td>
- <td><code>str</code></td>
- <td>Browser or browser component</td>
- <td><code>chrome</code>, <code>content_shell</code></td>
- <td><code>chrome_android</code>, <code>android_webview</code></td>
- </tr>
- <tr>
- <td><code>processor</code></td>
- <td><code>str</code></td>
- <td>CPU specifier</td>
- <td colspan="2"><code>arm</code>, <code>x86</code>, <code>x86_64</code></td>
- </tr>
- <tr>
- <td><code>flag_specific</code></td>
- <td><code>str</code></td>
- <td>Flag-specific suite name</td>
- <td colspan="2">
- See
- <code>
- <a
- href="https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/web_tests/FlagSpecificConfig">FlagSpecificConfig</a></code>
- (will be falsy for the generic suite)
- </td>
- </tr>
- <tr>
- <td><code>debug</code></td>
- <td><code>bool</code></td>
- <td><code>is_debug</code> build?</td>
- <td colspan="2">N/A</td>
- </tr>
-</table>
+| Property | Type | Description | Choices |
+| - | - | - | - |
+| `os` | `str` | OS family | `linux`, `android` |
+| `version` | `str` | OS version | Depends on `os` |
+| `product` | `str` | Browser or browser component | `chrome`, `content_shell`, `chrome_android`, `android_webview` |
+| `processor` | `str` | CPU specifier | `arm`, `x86`, `x86_64` |
+| `flag_specific` | `str` | Flag-specific suite name | See [`FlagSpecificConfig`](https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/web_tests/FlagSpecificConfig) (will be falsy for the generic suite) |
+| `debug` | `bool` | `is_debug` build? | N/A |
### Test Parameterization
@@ -259,7 +214,7 @@
Then, a file named `external/wpt/a.any.js.ini` stores expectations for all
parameterizations:
-```ini
+```
[a.any.html?b]
expected: OK
@@ -279,7 +234,7 @@
file for every test, place a file named `__dir__.ini` under the desired
directory with contents like:
-```ini
+```
expected:
if os == "linux": CRASH
disabled:
@@ -307,7 +262,7 @@
[`rebaseline-cl`](https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/tools/blinkpy/tool/commands/rebaseline_cl.py)).
Example invocation:
-```shell
+``` sh
./blink_tool.py update-metadata --verbose --bug=123 \
--build=linux-wpt-content-shell-fyi-rel:30 css/
```