From 4212ce07fae79483332e7c2b24b83e0eb8ff4f1a Mon Sep 17 00:00:00 2001 From: Maksim Sadym Date: Wed, 13 Nov 2024 15:13:11 +0100 Subject: [PATCH] Add testdriver_features and use in Chrome * Add testdriver_features * Choose ChromeDriverProtocol based on `testdriver_features` containing `bidi` --- .../webdriver/bidi/subscription.html.ini | 3 +- .../webdriver/bidi/subscription.window.js.ini | 2 + .../webdriver/bidi/subscription.html | 2 +- .../webdriver/bidi/subscription.window.js | 22 ++++++++ lint.ignore | 1 + resources/testdriver.js | 23 ++++++++ tools/lint/lint.py | 28 +++++++--- tools/manifest/item.py | 6 ++ tools/manifest/sourcefile.py | 56 ++++++++++++++++++- tools/manifest/tests/test_manifest.py | 10 +++- tools/manifest/tests/test_sourcefile.py | 53 ++++++++++++++++++ tools/wptrunner/wptrunner/browsers/chrome.py | 19 ++++++- .../wptrunner/executors/executorchrome.py | 32 ++++++++++- tools/wptrunner/wptrunner/wpttest.py | 11 +++- 14 files changed, 248 insertions(+), 20 deletions(-) create mode 100644 infrastructure/metadata/infrastructure/webdriver/bidi/subscription.window.js.ini create mode 100644 infrastructure/webdriver/bidi/subscription.window.js diff --git a/infrastructure/metadata/infrastructure/webdriver/bidi/subscription.html.ini b/infrastructure/metadata/infrastructure/webdriver/bidi/subscription.html.ini index 7c3127d167a740c..1a5ac47c67d942a 100644 --- a/infrastructure/metadata/infrastructure/webdriver/bidi/subscription.html.ini +++ b/infrastructure/metadata/infrastructure/webdriver/bidi/subscription.html.ini @@ -1 +1,2 @@ -disabled: https://github.com/web-platform-tests/wpt/issues/47544 +disabled: + if product != "chrome": @True diff --git a/infrastructure/metadata/infrastructure/webdriver/bidi/subscription.window.js.ini b/infrastructure/metadata/infrastructure/webdriver/bidi/subscription.window.js.ini new file mode 100644 index 000000000000000..1a5ac47c67d942a --- /dev/null +++ b/infrastructure/metadata/infrastructure/webdriver/bidi/subscription.window.js.ini @@ -0,0 +1,2 @@ +disabled: + if product != "chrome": @True diff --git a/infrastructure/webdriver/bidi/subscription.html b/infrastructure/webdriver/bidi/subscription.html index 056c2e5f77fb959..f1144b72fd56352 100644 --- a/infrastructure/webdriver/bidi/subscription.html +++ b/infrastructure/webdriver/bidi/subscription.html @@ -3,7 +3,7 @@ Test console log are present - + + + """.encode("utf-8") + + s = create("html/test.html", contents=contents) + s.testdriver_features == None + + +@pytest.mark.parametrize("features", + [[], ['feature_1'], ['feature_1', 'feature_2']]) +def test_html_testdriver_features(features): + contents = f""" +