Closed Bug 1382531 Opened 2 years ago Closed 2 years ago

rewrite crashtest for data: URI is unique opaque origin

Categories

(Core :: DOM: Security, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla56
Tracking Status
firefox56 --- fixed

People

(Reporter: allstars.chh, Assigned: allstars.chh)

References

Details

(Whiteboard: [domsecurity-active])

Attachments

(2 files, 1 obsolete file)

No description provided.
Attached patch Patch. (obsolete) — Splinter Review
Comment on attachment 8888735 [details] [diff] [review]
Patch.

Review of attachment 8888735 [details] [diff] [review]:
-----------------------------------------------------------------

::: docshell/base/crashtests/file_914521.html
@@ +13,5 @@
> +    window.addEventListener("popstate", spin);
> +    window.close();
> +    window.location = "#c";
> +    //TODO: JavaScript error: file:///home/allstars/src/gecko-dev/docshell/base/crashtests/file_914521.html, line 16: ReferenceError: finish is not defined
> +    //finish();

Smaug, do you know how should I fix this?
finsih is defined in 914521.html
However in crashtest it can't find 'finish'.
Attachment #8888735 - Flags: feedback?(bugs)
(In reply to Yoshi Huang [:allstars.chh] from comment #2)
> Smaug, do you know how should I fix this?
> finsih is defined in 914521.html
> However in crashtest it can't find 'finish'.

You could use a postMessage handler and report back to the main page that the test is finished and then actually call finish() i the .html file.
Comment on attachment 8888735 [details] [diff] [review]
Patch.

yeah, use postMessage, or can you use opener.Simpletest.finish() or some such?
Attachment #8888735 - Flags: feedback?(bugs)
Yeah, forgot to mention that I've tried this before, however window.opener is null. But I don't have this problem when running it as a normal page. I'll get more context from bug 914521.

Thanks
Comment on attachment 8889349 [details] [diff] [review]
Part 1: fix crashtest failiure when data URI is unique origin.

rs+
Attachment #8889349 - Flags: review?(bugs) → review+
Attachment #8889350 - Flags: review?(bugs) → review+
Pushed by yhuang@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/808600f02441
Part 1: rewrite crashtest for data: URI is unique opaque origin. r=smaug
https://hg.mozilla.org/integration/mozilla-inbound/rev/49eda81bca01
Part 2: add pref for docshell/base/crashtests/914521.html. r=smaug
https://hg.mozilla.org/mozilla-central/rev/808600f02441
https://hg.mozilla.org/mozilla-central/rev/49eda81bca01
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla56
You need to log in before you can comment on or make changes to this bug.