Closed Bug 721422 Opened 12 years ago Closed 12 years ago

[Page Thumbnails] Re-enable tests and make them work with URI_DANGEROUS_TO_LOAD

Categories

(Firefox :: Tabbed Browser, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
Firefox 12

People

(Reporter: ttaubert, Assigned: ttaubert)

References

Details

Attachments

(1 file, 1 obsolete file)

We need to use URI_DANGEROUS_TO_LOAD for the moz-page-thumb:// protocol because of bug 721398.
Depends on: CVE-2012-0476
Attached patch patch v1 (obsolete) — Splinter Review
I consolidated the two tests to a single test. We can just test the whole workflow instead of testing the cache separately.

We now use the hidden appShell to create and contain the canvas and img used to check the thumbnail's contents because that's privileged to load these since the protocol has the URI_DANGEROUS_TO_LOAD flag.
Assignee: nobody → ttaubert
Status: NEW → ASSIGNED
Attachment #591874 - Flags: review?(dietrich)
Attachment #591874 - Flags: review?(dietrich) → review+
Attached patch patch v2Splinter Review
Unfortunately the hiddenDOMWindow is XULWindow only on Mac. Linux and Windows return a normal unprivileged DOMWindow. I borrowed the new solution from the addon-sdk's hidden-frame.js which just creates a hidden XUL frame if needed.
Attachment #591874 - Attachment is obsolete: true
Attachment #591998 - Flags: review?(dietrich)
Comment on attachment 591998 [details] [diff] [review]
patch v2

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

argh, i forgot about the hidden window nightmare. there's a bug somewhere for having the platform allow proper hidden windows instead of these hackarounds...
Attachment #591998 - Flags: review?(dietrich) → review+
https://hg.mozilla.org/integration/fx-team/rev/9921aa6919e5

(In reply to Dietrich Ayala (:dietrich) from comment #3)
> argh, i forgot about the hidden window nightmare. there's a bug somewhere
> for having the platform allow proper hidden windows instead of these
> hackarounds...

Yeah, I know what bug you mean but couldn't find it. It was something about being able to create only a docShell without the browser/frame containing it.
Whiteboard: [fixed-in-fx-team]
Target Milestone: --- → Firefox 12
https://hg.mozilla.org/mozilla-central/rev/9921aa6919e5
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Whiteboard: [fixed-in-fx-team]
Depends on: 722479
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: