Closed Bug 1244425 Opened 8 years ago Closed 8 years ago

Avoid CPOW when setting file array on <input type=file>

Categories

(Remote Protocol :: Marionette, defect)

defect
Not set
normal

Tracking

(firefox49 fix-optional, firefox50- fixed, firefox51- fixed)

RESOLVED FIXED
mozilla51
Tracking Status
firefox49 --- fix-optional
firefox50 - fixed
firefox51 - fixed

People

(Reporter: ato, Assigned: ato)

References

Details

Attachments

(1 file)

Marionette passes an element reference from the content frame script to chrome space in order to gain access to element.mozSetFileArray, so users can set a file for <input type=file>.

This functionality is currently implemented in the Marionette:setElementValue message handler in GeckoDriver#sendKeysToElement: https://dxr.mozilla.org/mozilla-central/rev/d4213241bb796fdfa7a5ad4f1989e97b44474364/testing/marionette/driver.js#2208

Bug 1233497 outlaws the use of CPOWs but Marionette currently circumvents this by disabling the throwing via a preference.

We should avoid using a CPOW for this.
Blocks: 1238095
It looks like constructing File objects in content space is now (somehow) not broken anymore:

    let file = new File(path);
    let fs = Array.prototype.slice.call(inputEl.files);
    fs.push(file);
    inputEl.mozSetFileArray(fs);
Assignee: nobody → ato
Status: NEW → ASSIGNED
Making this depend on bug 1280947 as it contains some improvements to how we call mozSetFileArray.
Depends on: 1280947
Comment on attachment 8786321 [details]
Bug 1244425 - Avoid CPOW when setting file array on <input type=file>;

https://reviewboard.mozilla.org/r/75306/#review73212
Attachment #8786321 - Flags: review?(dburns) → review+
Pushed by atolfsen@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/6c382a30453a
Avoid CPOW when setting file array on <input type=file>; r=automatedtester
https://hg.mozilla.org/mozilla-central/rev/6c382a30453a
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla51
Test only changes.  Depends on bug 1280947.
Whiteboard: [checkin-needed-aurora][checkin-needed-beta]
Whiteboard: [checkin-needed-aurora][checkin-needed-beta]
We are very late in beta now but could still take uplift for 50.
[Tracking Requested - why for this release]: Now that 50 is on the Beta channel, I would not block on this but we should consider fixing this test in Aurora 51.

Hi Andreas, David, do we plan to uplift this test fix in Aurora51?
Flags: needinfo?(dburns)
I am pretty sure the reason this failed on uplift was because of a dep which should be in all the way to beta. I will let Andreas run a test to check that we have a clean build/test of beta
Flags: needinfo?(dburns)
I’m unsure about the tracking vs. status flags on this bug:

tracking-firefox51: 	?
status-firefox51: 	fixed 

It says it’s been fixed in Firefox 51 but is not tracking.  Where do I find out what Firefox version is currently in Aurora/Beta and so on?
Flags: needinfo?(ato)
Firefox 50 is in Beta at the moment 

Details can be found in https://wiki.mozilla.org/RapidRelease/Calendar
Un track 51 as it's fixed.
Patch seems fine.  Requesting uplift again.
Whiteboard: [checkin-needed-beta]
Product: Testing → Remote Protocol
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: