Update tests within dom/ to comply with new toplevel data: URI navigation policy

RESOLVED FIXED in Firefox 57

Status

()

Core
DOM: Security
P2
normal
RESOLVED FIXED
2 months ago
2 months ago

People

(Reporter: ckerschb, Assigned: ckerschb)

Tracking

unspecified
mozilla57
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox57 fixed)

Details

(Whiteboard: [domsecurity-active])

Attachments

(1 attachment)

Comment hidden (empty)
(Assignee)

Updated

2 months ago
Blocks: 1380959
Priority: -- → P3
Whiteboard: [domsecurity-backlog1]
(Assignee)

Updated

2 months ago
Assignee: nobody → ckerschb
Status: NEW → ASSIGNED
Priority: P3 → P2
Whiteboard: [domsecurity-backlog1] → [domsecurity-active]
(Assignee)

Comment 1

2 months ago
Created attachment 8906371 [details] [diff] [review]
bug_1397655_dom_tests.patch

Smaug, overall we are facing several failing tests within docshell/ when flipping the pref |security.data_uri.block_toplevel_data_uri_navigations|:
* dom/base/test/browser_bug1303838.js
* dom/base/test/test_data_uri.html
* dom/base/test/test_x-frame-options.html
* dom/file/tests/test_ipc_messagemanager_blob.html
* dom/html/test/test_fullscreen-api-race.html
* dom/ipc/tests/test_cpow_cookies.html
* dom/plugins/test/mochitest/test_pluginstream_err.html

Some explanations:
I think dom/base/test/test_data_uri.html should be testing the data URI, hence I think it makes sense to explicitly set the pref to false.

For dom/base/test/test_x-frame-options.html, the is e.g. this comment '// test that a document can be framed under a data: URL opened by the same site as the frame', hence I think it makes more sense to explicitly push the pref for the test, if you feel different, please let me know.

For the test test/test_fullscreen-api-race.html, we already set the pref |security.data_uri.unique_opaque_origin|, hence I think we should also set the pref explicitly for this test.

To be honest, I don't know how to easily rewrite dom/plugins/test/mochitest/test_pluginstream_err.html without putting in too much effort, would you be fine with accepting the updated test where I just push the pref explicitly?

Seems there are no more dom/ tests that need to be rewritten:
https://treeherder.mozilla.org/#/jobs?repo=try&revision=cb517e30d8209331f929f9a3f9fd2b61a5fed63c
Attachment #8906371 - Flags: review?(bugs)

Updated

2 months ago
Attachment #8906371 - Flags: review?(bugs) → review+

Comment 2

2 months ago
Pushed by mozilla@christophkerschbaumer.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/697d93c85b77
Update tests within dom/ to comply with new toplevel data: URI navigation policy. r=smaug
https://hg.mozilla.org/mozilla-central/rev/697d93c85b77
Status: ASSIGNED → RESOLVED
Last Resolved: 2 months ago
status-firefox57: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla57

Updated

2 months ago
Depends on: 1264588
You need to log in before you can comment on or make changes to this bug.