The patch from bug 1146116 contains a test case which confirms that, after calling mozSetFileArray on an input element, the File object read back from it belongs to the element's global, even if the original File did not. This part is working correctly. The test also, as a sanity check, confirms that it did in fact pass a cross-origin File. Unfortunately, this part is incorrect: isnot(SpecialPowers.Cu.getGlobalForObject(elem), window, "File from MessageManager is wrapped"); This test will never fail, because the return value of getGlobalForObject will be a Proxy (as for SpecialPowers.wrap), and will therefore not compare equal to any actual global; it has to be passed through SpecialPowers.unwrap, as is done for the second test. It would also fail if it did that, because it's testing `elem` (the input element, which does belong to the script's global) rather than `file` (the cross-origin-wrapped File object). Aside from being slightly embarrassing, this defeats the purpose of adding that check: to verify that the test is in fact testing what it's meant to be.
(This bug isn't really about *submitting* an HTML form, anymore.)
Component: HTML: Form Submission → DOM: Core & HTML
Created attachment 8586435 [details] [diff] [review] bug1149395-oops-hg0.diff Rolling the magic 8-ball of DOM peers....
Attachment #8586435 - Flags: review?(mrbkap)
Comment on attachment 8586435 [details] [diff] [review] bug1149395-oops-hg0.diff Review of attachment 8586435 [details] [diff] [review]: ----------------------------------------------------------------- Good catch.
Attachment #8586435 - Flags: review?(mrbkap) → review+
No try run for C-N because: it's a change to one specific test, and the changes shouldn't depend on platform. Tested locally on x86_64/Linux desktop (e10s and not), and B2G emulator (non-debug) and emulator-x86-kk (debug).
Status: NEW → RESOLVED
Last Resolved: 3 years ago
status-firefox40: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla40
You need to log in before you can comment on or make changes to this bug.