Closed Bug 1385223 Opened 7 years ago Closed 7 years ago

Convert tests within dom/plugins/test/mochitest/ to comply with new data: URI inheritance model

Categories

(Core :: DOM: Security, enhancement, P2)

enhancement

Tracking

()

RESOLVED FIXED
mozilla56
Tracking Status
firefox56 --- fixed

People

(Reporter: ckerschb, Assigned: ckerschb)

References

Details

(Whiteboard: [domsecurity-active])

Attachments

(1 file)

      No description provided.
Assignee: nobody → ckerschb
Blocks: 1324406
Status: NEW → ASSIGNED
Priority: -- → P2
Whiteboard: [domsecurity-active]
Benjamin, when flipping the pref |security.data_uri.unique_opaque_origin| data: URIs become cross origin with their including context. The three tests in the attached patch are failing when flipping the pref. It took me quite some time to figure out why. Apparently nptest.cpp [1] prepends data: URI for those cases. I don't really wanna touch nptest.cpp, so I rather suggest to use SpecialPowers.wrap() to make these tests work correctly again. Any objections to that?

[1] https://dxr.mozilla.org/mozilla-central/source/dom/plugins/test/testplugin/nptest.cpp#463
Attachment #8891272 - Flags: review?(benjamin)
Comment on attachment 8891272 [details] [diff] [review]
bug_1385223_plugin_tests.patch

Yes, that's fine. The plugin has a limited ability to load data into frames, so data: was the best choice here.
Attachment #8891272 - Flags: review?(benjamin) → review+
Pushed by ryanvm@gmail.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/63182061f15b
Convert tests within dom/plugins/test/mochitest/ to comply with new data: URI inheritance model. r=bsmedberg
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/63182061f15b
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla56
You need to log in before you can comment on or make changes to this bug.