Add run_webgpu_cts.py wrapper script

This CL adds a wrapper script around run_web_tests.py for running
the WebGPU CTS. The CTS can understand some test expectations directly, and
this script will be updated in future patches to pass some of the expectations
for run_web_tests.py to the CTS Javascript harness.

This CL also moves blink/tools/extract_expectation_names.py to
third_party/webgpu-cts/scripts because it is used exclusively for WebGPU CTS
variant generation.

Bug: chromium:1186320
Change-Id: I3d2578c0dd42744912fdc6621eaef9cdb54b8234
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2783224
Reviewed-by: Corentin Wallez <[email protected]>
Reviewed-by: Dirk Pranke <[email protected]>
Commit-Queue: Austin Eng <[email protected]>
Cr-Commit-Position: refs/heads/master@{#866153}
diff --git a/third_party/webgpu-cts/scripts/run_webgpu_cts.py b/third_party/webgpu-cts/scripts/run_webgpu_cts.py
new file mode 100644
index 0000000..e0aa730
--- /dev/null
+++ b/third_party/webgpu-cts/scripts/run_webgpu_cts.py
@@ -0,0 +1,32 @@
+# Copyright 2021 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+import argparse
+import sys
+
+# This script is run via //third_party/blink/tools/run_webgpu_cts.py which
+# adds blinkpy to the Python path.
+from blinkpy.web_tests import run_web_tests
+
+
+def main(args, stderr):
+    parser = argparse.ArgumentParser(
+        description=
+        'Performs additional setup for running the WebGPU CTS, '
+        'then forward arguments to run_web_tests.py.'
+    )
+    parser.add_argument('--webgpu-cts-expectations', required=True)
+
+    options, rest_args = parser.parse_known_args(args)
+
+    forwarded_args = rest_args + [
+        '--ignore-default-expectations', '--additional-expectations',
+        options.webgpu_cts_expectations
+    ]
+
+    run_web_tests.main(forwarded_args, stderr)
+
+
+if __name__ == '__main__':
+    sys.exit(main(sys.argv[1:], sys.stderr))