Closed
Bug 1149395
Opened 9 years ago
Closed 9 years ago
Improve test case from bug 1146116 (mozSetFileArray recompartmenting)
Categories
(Core :: DOM: Core & HTML, defect)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
FIXED
mozilla40
Tracking | Status | |
---|---|---|
firefox40 | --- | fixed |
People
(Reporter: jld, Assigned: jld)
References
Details
Attachments
(1 file)
1.62 KB,
patch
|
mrbkap
:
review+
|
Details | Diff | Splinter Review |
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.
Assignee | ||
Comment 1•9 years ago
|
||
(This bug isn't really about *submitting* an HTML form, anymore.)
Component: HTML: Form Submission → DOM: Core & HTML
Assignee | ||
Comment 2•9 years ago
|
||
Rolling the magic 8-ball of DOM peers....
Attachment #8586435 -
Flags: review?(mrbkap)
Comment 3•9 years ago
|
||
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+
Assignee | ||
Comment 4•9 years ago
|
||
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).
Keywords: checkin-needed
Comment 5•9 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/82a14807801c
Flags: in-testsuite+
Keywords: checkin-needed
Comment 6•9 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/82a14807801c
Status: NEW → RESOLVED
Closed: 9 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.
Description
•