Closed Bug 1596601 Opened 5 years ago Closed 4 years ago

Add place-holder for Page.setInterceptFileChooserDialog

Categories

(Remote Protocol :: CDP, enhancement, P1)

enhancement

Tracking

(firefox74 fixed)

RESOLVED FIXED
Firefox 74
Tracking Status
firefox74 --- fixed

People

(Reporter: impossibus, Assigned: whimboo)

References

Details

(Whiteboard: [puppeteer-beta-mvp])

Attachments

(2 files)

This method affects many Puppeteer unit tests and gutenberg tests, since it's involved in creating a Page class.

"When file chooser interception is enabled, native file chooser dialog is not shown. Instead, a protocol event Page.fileChooserOpened is emitted."

Priority: P2 → P3
Whiteboard: [puppeteer-alpha] → [puppeteer-alpha-reserve]

I asked Olli on IRC and he pointed me to:

•smaug> whimboo: https://searchfox.org/mozilla-central/source/testing/specialpowers/content/MockFilePicker.jsm#42 is used by several tests https://searchfox.org/mozilla-central/search?q=mockfile&path=

It doesn't look too hard to get implemented. Also we would only need a bare minimum of what SpecialPowers implements.

While this method affects a lot of tests it's not a blocker for the alpha release. Reason is that there is a fallback:
https://github.com/puppeteer/puppeteer/blob/master/lib/Page.js#L140-L142

It also means that this failure doesn't cause the hang for most of the Puppeteer unit tests.

Whiteboard: [puppeteer-alpha-reserve]

There doesn’t appear to be a fallback, but it sets the internal state _fileChooserInterceptionIsDisabled.
I looked, but couldn’t find this was used for anything.

Priority: P3 → P2
Whiteboard: [puppeteer-beta-mvp]

Note that this API is marked as experimental in Puppeteer. As such I think it should be enough to just add a place-holder for now. Given that it sets the internal state (as mentioned above) we should get around from those many failures in Puppeteer unit tests.

This feature is experimental and not required to get implemented
on our end as of now. As such adding a place-holder will be enough.

Assignee: nobody → hskupin
Status: NEW → ASSIGNED
Priority: P2 → P1
Summary: Implement Page.setInterceptFileChooserDialog → Add place-holder for Page.setInterceptFileChooserDialog

https://treeherder.mozilla.org/#/jobs?repo=try&tier=1%2C2%2C3&revision=7745788be264d8b08163badb6f9b289fd5809452

With this push some more Puppeteer tests crash. I will have to also mark those as skipped.

Pushed by hskupin@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/d212635f9463
[remote] Add place-holder for Page.setInterceptFileChooserDialog. r=remote-protocol-reviewers,ato
https://hg.mozilla.org/integration/autoland/rev/267643528022
[remote] Skip some more crashing Puppeteer unit tests. r=remote-protocol-reviewers,ato
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 74
Component: CDP: Page → CDP
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: