Skip to content

Remove special handling for getSelection() with Firefox from tests #35271

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

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

whimboo
Copy link
Collaborator

@whimboo whimboo commented Mar 19, 2025

We got https://bugzilla.mozilla.org/show_bug.cgi?id=85686 in Firefox fixed for version 138 which is currently in Nightly. That means that we no longer need to special-case the handling for getSelection() with Firefox.

I assume this PR needs to wait with getting merged until Firefox 138 is going to be released?

@sefeng211
Copy link

It's Nightly only feature for now, I plan to give it some time before enabling it. So we should only remove the special-case handling after it's enabled in Release

@whimboo whimboo marked this pull request as draft March 19, 2025 13:11
@whimboo
Copy link
Collaborator Author

whimboo commented Mar 19, 2025

Oh, good point. Lets move this PR to draft for now.

@whimboo
Copy link
Collaborator Author

whimboo commented Mar 19, 2025

Enabling by default for all Firefox builds is covered by https://bugzilla.mozilla.org/show_bug.cgi?id=1954979.

Copy link
Contributor

Test results for "tests 1"

4 failed
❌ [firefox-page] › tests/page/elementhandle-select-text.spec.ts:20:3 › should select textarea @firefox-ubuntu-22.04-node18
❌ [firefox-page] › tests/page/elementhandle-select-text.spec.ts:33:3 › should select input @firefox-ubuntu-22.04-node18
❌ [firefox-page] › tests/page/locator-misc-2.spec.ts:76:3 › should select textarea @firefox-ubuntu-22.04-node18
❌ [firefox-page] › tests/page/retarget.spec.ts:212:3 › input value retargeting @firefox-ubuntu-22.04-node18

4 flaky ⚠️ [firefox-page] › tests/page/page-evaluate.spec.ts:403:3 › should throw for too deep reference chain @firefox-ubuntu-22.04-node18
⚠️ [webkit-library] › tests/library/trace-viewer.spec.ts:773:1 › should handle src=blob @webkit-ubuntu-22.04-node18
⚠️ [webkit-page] › tests/page/page-screenshot.spec.ts:345:5 › page screenshot › should work while navigating @webkit-ubuntu-22.04-node18
⚠️ [playwright-test] › tests/ui-mode-test-watch.spec.ts:145:5 › should watch all @windows-latest-node18-1

38780 passed, 808 skipped
✔️✔️✔️

Merge workflow run.

@yury-s
Copy link
Member

yury-s commented Apr 4, 2025

@whimboo what is the status of this? The Firefox bug has been closed, do we just wait for the next FF roll?

FYI, I'm also enabling the tests in WebKit: #35498.

@whimboo
Copy link
Collaborator Author

whimboo commented Apr 7, 2025

@whimboo what is the status of this? The Firefox bug has been closed, do we just wait for the next FF roll?

The fix will be in Firefox 139 - where it will be enabled by default. It will ride the trains and will be released on May 27th. If you want to get rid of this code already for 138 which is on beta now, you could temporarily use the dom.selection.mimic_chrome_tostring.enabled preference and set it to true. It's release will be on April 29th.

But I think that this change can wait for the 139 release given that it was broken for such a long time.

@yury-s
Copy link
Member

yury-s commented Apr 7, 2025

Ok, let's wait until it is released.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants