Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support testdriver.js in reftests #13183

Open
gsnedders opened this issue Sep 24, 2018 · 23 comments
Open

Support testdriver.js in reftests #13183

gsnedders opened this issue Sep 24, 2018 · 23 comments
Assignees
Labels
infra priority:backlog testdriver.js type:untestable wptrunner The automated test runner, commonly called through ./wpt run

Comments

@gsnedders
Copy link
Member

gsnedders commented Sep 24, 2018

Previously, when testdriver.js we decided to punt on supporting it in reftests; we now have an actual use for it (#9346), so this needs done.

This will need changes in all the executors: the Python code needs to handle various messages to interact with the document before eventually taking a screenshot, and the JavaScript callbacks needs to deal with passing the testdriver.js messages. The right way to do this is probably by way of comparison of both bits of reftest code with the test harness code.

@gsnedders
Copy link
Member Author

Myself and @jgraham have separately on various occasions remembered that this is going to be somewhat awkward for Firefox the internal Marionette reftest runner, given we'll need to reimplement the testdriver.js implementation within Marionette for that.

Perhaps the right solution here is to just put some "testdriver" flag in the manifest and then use the external reftest runner for those tests.

@jgraham
Copy link
Contributor

jgraham commented Jan 14, 2019

Yeah, that seems acceptable for a v1 implemenation; we would probably want to fix this to work inside the harness later, but that could be a seperate project.

@gsnedders
Copy link
Member Author

I'm concerned about the ongoing maintenance cost of having yet another implementation, especially one that wptrunner relies on (and which exists in an external repo). I'm not convinced the benefits of having the internal reftest runner support testdriver.js are actually big enough to outweigh that cost.

@jgraham
Copy link
Contributor

jgraham commented Jan 14, 2019

It's probably a bad idea but we definitely could put the code in the wpt repo and ship it over to marionette in the reftest:setup.

@foolip
Copy link
Member

foolip commented Mar 22, 2019

@gsnedders any chance of getting this fixed before the end of the quarter?

@gsnedders
Copy link
Member Author

Is there any reason to believe this is so high priority? Does it affect more tests than other untestable issues?

@foolip
Copy link
Member

foolip commented Jun 5, 2019

@Hexcles having dug into test writing patterns in Chromium a bit, do you have a hunch for how often this would be useful? I'm inclined to agree with @gsnedders that maybe this isn't very high prio, but don't know.

@foolip
Copy link
Member

foolip commented Oct 7, 2019

I've downgraded the priority. We'll probably want this to convert manual tests in the future, but at this point the request for it isn't coming from outside, it's just those of us working on wpt infra that think it's a good idea.

@Hexcles
Copy link
Member

Hexcles commented Oct 8, 2019

My research only looked at existing tests / test history. And of course, there is zero testdriver usage in reftests as it doesn't work, but I don't know how many people attempted to do that.

@gsnedders
Copy link
Member Author

I think there was some discussion at TPAC suggesting this was needed for a whole bunch of tests, but I think it's pretty low priority still.

@stephenmcgruer
Copy link
Contributor

stephenmcgruer commented Dec 15, 2020

So there is now at least one case of testdriver.js being used in reftests, in css/selectors/remove-hovered-element.html - which a Chromium engineer asked about today as it times out in all browsers in wpt.fyi.

Doing a quick grep, there are half a dozen cases today in the tree (some of which pass!):

$ grep -lr rel.*match  | xargs grep -lr testdriver.js 
css/css-grid/grid-model/grid-layout-stale-001.html
css/css-grid/grid-model/grid-layout-stale-002.html
css/css-shadow-parts/interaction-with-nested-pseudo-class.html
css/selectors/remove-hovered-element.html
pointerevents/pointerevent_releasepointercapture_invalid_pointerid.html
[tools/ entries]
docs/writing-tests/test-templates.md

@stephenmcgruer
Copy link
Contributor

as it times out in all browsers in wpt.fyi.

Note that with the current testrunner implementation in Chromium's CI (which is not wptrunner), this test passes in Chromium's CI, which is why the engineer was surprised to discover the all-timeout status.

@josepharhar
Copy link
Contributor

I am adding some new tests which need this fixed here: #34169

chromium-wpt-export-bot pushed a commit that referenced this issue May 13, 2024
testdriver is not supported in reftests:
#13183
#46152

I worked around using testdriver in some of these tests, but others
really need to use testdriver so I put a comment in them saying that the
test probably won't work until testdriver in reftests is supported.
These tests are still worth keeping not only for future support but
because they work properly when run with run_web_tests.py.

Bug: 40146374
Change-Id: I73d02e5ead3c2dd4c84300e78f6502357dd7524b
chromium-wpt-export-bot pushed a commit that referenced this issue May 14, 2024
testdriver is not supported in reftests:
#13183
#46119

These tests need to use testdriver in reftests, so I am adding them to
the lint ignore file. These tests are still worth keeping not only for
future support but because they work properly when run with
run_web_tests.py.

Bug: 40146374
Change-Id: I73d02e5ead3c2dd4c84300e78f6502357dd7524b
chromium-wpt-export-bot pushed a commit that referenced this issue May 14, 2024
testdriver is not supported in reftests:
#13183
#46119

These tests need to use testdriver in reftests, so I am adding them to
the lint ignore file. These tests are still worth keeping not only for
future support but because they work properly when run with
run_web_tests.py.

Bug: 40146374
Change-Id: I73d02e5ead3c2dd4c84300e78f6502357dd7524b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5536157
Commit-Queue: Joey Arhar <jarhar@chromium.org>
Reviewed-by: Weizhong Xia <weizhong@google.com>
Reviewed-by: David Baron <dbaron@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1300910}
aarongable pushed a commit to chromium/chromium that referenced this issue May 14, 2024
testdriver is not supported in reftests:
web-platform-tests/wpt#13183
web-platform-tests/wpt#46119

These tests need to use testdriver in reftests, so I am adding them to
the lint ignore file. These tests are still worth keeping not only for
future support but because they work properly when run with
run_web_tests.py.

Bug: 40146374
Change-Id: I73d02e5ead3c2dd4c84300e78f6502357dd7524b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5536157
Commit-Queue: Joey Arhar <jarhar@chromium.org>
Reviewed-by: Weizhong Xia <weizhong@google.com>
Reviewed-by: David Baron <dbaron@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1300910}
chromium-wpt-export-bot pushed a commit that referenced this issue May 14, 2024
testdriver is not supported in reftests:
#13183
#46119

These tests need to use testdriver in reftests, so I am adding them to
the lint ignore file. These tests are still worth keeping not only for
future support but because they work properly when run with
run_web_tests.py.

Bug: 40146374
Change-Id: I73d02e5ead3c2dd4c84300e78f6502357dd7524b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5536157
Commit-Queue: Joey Arhar <jarhar@chromium.org>
Reviewed-by: Weizhong Xia <weizhong@google.com>
Reviewed-by: David Baron <dbaron@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1300910}
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this issue May 21, 2024
… a=testonly

Automatic update from web-platform-tests
Add TESTDRIVER-IN-UNSUPPORTED-TYPE lint

This is partly related to
web-platform-tests/wpt#13183 (Support
testdriver.js in reftests), but makes it clear to test authors that
this isn't expected to work currently.

--

wpt-commits: 8ce6855cd1a97a043473b7eb6e03571297c00aec
wpt-pr: 46119
jamienicol pushed a commit to jamienicol/gecko that referenced this issue May 23, 2024
… a=testonly

Automatic update from web-platform-tests
Add TESTDRIVER-IN-UNSUPPORTED-TYPE lint

This is partly related to
web-platform-tests/wpt#13183 (Support
testdriver.js in reftests), but makes it clear to test authors that
this isn't expected to work currently.

--

wpt-commits: 8ce6855cd1a97a043473b7eb6e03571297c00aec
wpt-pr: 46119
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this issue May 23, 2024
…o lint ignore, a=testonly

Automatic update from web-platform-tests
Add StylableSelect testdriver reftests to lint ignore

testdriver is not supported in reftests:
web-platform-tests/wpt#13183
web-platform-tests/wpt#46119

These tests need to use testdriver in reftests, so I am adding them to
the lint ignore file. These tests are still worth keeping not only for
future support but because they work properly when run with
run_web_tests.py.

Bug: 40146374
Change-Id: I73d02e5ead3c2dd4c84300e78f6502357dd7524b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5536157
Commit-Queue: Joey Arhar <jarhar@chromium.org>
Reviewed-by: Weizhong Xia <weizhong@google.com>
Reviewed-by: David Baron <dbaron@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1300910}

--

wpt-commits: 8a5323f08032c37317c40d0725145b82dbca8104
wpt-pr: 46239
jamienicol pushed a commit to jamienicol/gecko that referenced this issue May 24, 2024
…o lint ignore, a=testonly

Automatic update from web-platform-tests
Add StylableSelect testdriver reftests to lint ignore

testdriver is not supported in reftests:
web-platform-tests/wpt#13183
web-platform-tests/wpt#46119

These tests need to use testdriver in reftests, so I am adding them to
the lint ignore file. These tests are still worth keeping not only for
future support but because they work properly when run with
run_web_tests.py.

Bug: 40146374
Change-Id: I73d02e5ead3c2dd4c84300e78f6502357dd7524b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5536157
Commit-Queue: Joey Arhar <jarhar@chromium.org>
Reviewed-by: Weizhong Xia <weizhong@google.com>
Reviewed-by: David Baron <dbaron@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1300910}

--

wpt-commits: 8a5323f08032c37317c40d0725145b82dbca8104
wpt-pr: 46239
@WeizhongX
Copy link
Contributor

I realized we should put such tests in wpt_internal until this issue is fixed. @josepharhar WDYT?

@josepharhar
Copy link
Contributor

I realized we should put such tests in wpt_internal until this issue is fixed. @josepharhar WDYT?

That sounds fine to me

chromium-wpt-export-bot pushed a commit that referenced this issue Jun 1, 2024
Wptrunner does not support testdriver for test types other than
test harness test. These tests will fail in most browsers with Chrome
included. Move them to wpt_internal for now. We can move them back to
external/wpt once the bug is resolved.

Bug: #13183
Change-Id: I81a4d218c318a344992f2661d463c71607e41d18
chromium-wpt-export-bot pushed a commit that referenced this issue Jun 4, 2024
Wptrunner does not support testdriver for test types other than
test harness test. These tests will either fail or do not test
what they intend to test in most browsers with Chrome
included. Move them to wpt_internal for now. We can move them back to
external/wpt once the bug is resolved.

For reftests that use testdriver, they all shown as Timeout on
wpt.fyi. For crashtests, an exception[1] will be thrown at browser
side, but since the browser did not crash, the test will still
pass but won't test anything useful.

[1] https://source.chromium.org/chromium/chromium/src/+/main:third_party/wpt_tools/wpt/tools/wptrunner/wptrunner/testdriver-extra.js;l=140

Bug: #13183
Bug: #31739
Change-Id: I81a4d218c318a344992f2661d463c71607e41d18
aarongable pushed a commit to chromium/chromium that referenced this issue Jun 4, 2024
Wptrunner does not support testdriver for test types other than
test harness test. These tests will either fail or do not test
what they intend to test in most browsers with Chrome
included. Move them to wpt_internal for now. We can move them back to
external/wpt once the bug is resolved.

For reftests that use testdriver, they all shown as Timeout on
wpt.fyi. For crashtests, an exception[1] will be thrown at browser
side, but since the browser did not crash, the test will still
pass but won't test anything useful.

[1] https://source.chromium.org/chromium/chromium/src/+/main:third_party/wpt_tools/wpt/tools/wptrunner/wptrunner/testdriver-extra.js;l=140

Bug: web-platform-tests/wpt#13183
Bug: web-platform-tests/wpt#31739
Change-Id: I81a4d218c318a344992f2661d463c71607e41d18
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5589091
Reviewed-by: Mason Freed <masonf@chromium.org>
Reviewed-by: Joey Arhar <jarhar@chromium.org>
Commit-Queue: Weizhong Xia <weizhong@google.com>
Cr-Commit-Position: refs/heads/main@{#1310309}
chromium-wpt-export-bot pushed a commit that referenced this issue Jun 5, 2024
Wptrunner does not support testdriver for test types other than
test harness test. These tests will either fail or do not test
what they intend to test in most browsers with Chrome
included. Move them to wpt_internal for now. We can move them back to
external/wpt once the bug is resolved.

For reftests that use testdriver, they all shown as Timeout on
wpt.fyi. For crashtests, an exception[1] will be thrown at browser
side, but since the browser did not crash, the test will still
pass but won't test anything useful.

[1] https://source.chromium.org/chromium/chromium/src/+/main:third_party/wpt_tools/wpt/tools/wptrunner/wptrunner/testdriver-extra.js;l=140

Bug: #13183
Bug: #31739
Change-Id: I81a4d218c318a344992f2661d463c71607e41d18
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5589091
Reviewed-by: Mason Freed <masonf@chromium.org>
Reviewed-by: Joey Arhar <jarhar@chromium.org>
Commit-Queue: Weizhong Xia <weizhong@google.com>
Cr-Commit-Position: refs/heads/main@{#1310309}
chromium-wpt-export-bot pushed a commit that referenced this issue Jun 5, 2024
Wptrunner does not support testdriver for test types other than
test harness test. These tests will either fail or do not test
what they intend to test in most browsers with Chrome
included. Move them to wpt_internal for now. We can move them back to
external/wpt once the bug is resolved.

For reftests that use testdriver, they all shown as Timeout on
wpt.fyi. For crashtests, an exception[1] will be thrown at browser
side, but since the browser did not crash, the test will still
pass but won't test anything useful.

[1] https://source.chromium.org/chromium/chromium/src/+/main:third_party/wpt_tools/wpt/tools/wptrunner/wptrunner/testdriver-extra.js;l=140

Bug: #13183
Bug: #31739
Change-Id: I81a4d218c318a344992f2661d463c71607e41d18
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5589091
Reviewed-by: Mason Freed <masonf@chromium.org>
Reviewed-by: Joey Arhar <jarhar@chromium.org>
Commit-Queue: Weizhong Xia <weizhong@google.com>
Cr-Commit-Position: refs/heads/main@{#1310309}
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this issue Jun 7, 2024
…iver to wpt_internal, a=testonly

Automatic update from web-platform-tests
Move reftests/crashtests that use testdriver to wpt_internal

Wptrunner does not support testdriver for test types other than
test harness test. These tests will either fail or do not test
what they intend to test in most browsers with Chrome
included. Move them to wpt_internal for now. We can move them back to
external/wpt once the bug is resolved.

For reftests that use testdriver, they all shown as Timeout on
wpt.fyi. For crashtests, an exception[1] will be thrown at browser
side, but since the browser did not crash, the test will still
pass but won't test anything useful.

[1] https://source.chromium.org/chromium/chromium/src/+/main:third_party/wpt_tools/wpt/tools/wptrunner/wptrunner/testdriver-extra.js;l=140

Bug: web-platform-tests/wpt#13183
Bug: web-platform-tests/wpt#31739
Change-Id: I81a4d218c318a344992f2661d463c71607e41d18
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5589091
Reviewed-by: Mason Freed <masonf@chromium.org>
Reviewed-by: Joey Arhar <jarhar@chromium.org>
Commit-Queue: Weizhong Xia <weizhong@google.com>
Cr-Commit-Position: refs/heads/main@{#1310309}

--

wpt-commits: 0a2dc15a5126b874b4f20cab03b5ca422a7ad86f
wpt-pr: 46576
ErichDonGubler pushed a commit to erichdongubler-mozilla/firefox that referenced this issue Jun 10, 2024
…iver to wpt_internal, a=testonly

Automatic update from web-platform-tests
Move reftests/crashtests that use testdriver to wpt_internal

Wptrunner does not support testdriver for test types other than
test harness test. These tests will either fail or do not test
what they intend to test in most browsers with Chrome
included. Move them to wpt_internal for now. We can move them back to
external/wpt once the bug is resolved.

For reftests that use testdriver, they all shown as Timeout on
wpt.fyi. For crashtests, an exception[1] will be thrown at browser
side, but since the browser did not crash, the test will still
pass but won't test anything useful.

[1] https://source.chromium.org/chromium/chromium/src/+/main:third_party/wpt_tools/wpt/tools/wptrunner/wptrunner/testdriver-extra.js;l=140

Bug: web-platform-tests/wpt#13183
Bug: web-platform-tests/wpt#31739
Change-Id: I81a4d218c318a344992f2661d463c71607e41d18
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5589091
Reviewed-by: Mason Freed <masonf@chromium.org>
Reviewed-by: Joey Arhar <jarhar@chromium.org>
Commit-Queue: Weizhong Xia <weizhong@google.com>
Cr-Commit-Position: refs/heads/main@{#1310309}

--

wpt-commits: 0a2dc15a5126b874b4f20cab03b5ca422a7ad86f
wpt-pr: 46576
@mfreed7
Copy link
Contributor

mfreed7 commented Sep 5, 2024

I've downgraded the priority. We'll probably want this to convert manual tests in the future, but at this point the request for it isn't coming from outside, it's just those of us working on wpt infra that think it's a good idea.

I'd like to revisit the priority of this issue. While it perhaps didn't have many users before, there is one key new feature that requires this functionality: the customizable-<select> project, whose primary use case is improving stylability and interoperability of the picker for <select>. Since we can't open the picker without testdriver functionality (e.g. test_driver.bless()), we can't effectively test the appearance of the picker via WPT.

Are there any updates, or potential solutions/workarounds to get this to work? I'm happy to use a "hack" that lets me open pickers and use a regular reference test, if such a thing exists.

@WeizhongX
Copy link
Contributor

We can take a look at this in next quarter.

@jgraham
Copy link
Contributor

jgraham commented Sep 6, 2024

FWIW the "hack" solution here would be to expose element screenshots via testdriver and then you could make a custom implementation of reftests in testharness tests.

@schenney-chromium
Copy link
Contributor

There are several other things that require this for testing:

  • spelling/grammar/etc markers (anything normally added by the user agent based on user action).
  • Editing caret rendering
  • The aforementioned things needing user activation

Regarding the solution of exposing screen shots in testdriver, that solution is analogous to canvas tests that extract the canvas contents to a bitmap and then check pixels. It works well if you want to know that something happened, or if you want to check a few specific pixels, but it's hard to check something like whether the correct content appears inside a popup.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
infra priority:backlog testdriver.js type:untestable wptrunner The automated test runner, commonly called through ./wpt run
Projects
None yet
Development

No branches or pull requests

10 participants