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

RESOLVED FIXED in Firefox 12

Status

()

Firefox
Tabbed Browser
RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: ttaubert, Assigned: ttaubert)

Tracking

Trunk
Firefox 12
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

We need to use URI_DANGEROUS_TO_LOAD for the moz-page-thumb:// protocol because of bug 721398.
Depends on: 721398
Created attachment 591874 [details] [diff] [review]
patch v1

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+
Created attachment 591998 [details] [diff] [review]
patch v2

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
Last Resolved: 6 years ago
Resolution: --- → FIXED
Whiteboard: [fixed-in-fx-team]

Updated

6 years ago
Depends on: 722479
You need to log in before you can comment on or make changes to this bug.