Last Comment Bug 721422 - [Page Thumbnails] Re-enable tests and make them work with URI_DANGEROUS_TO_LOAD
: [Page Thumbnails] Re-enable tests and make them work with URI_DANGEROUS_TO_LOAD
Status: RESOLVED FIXED
:
Product: Firefox
Classification: Client Software
Component: Tabbed Browser (show other bugs)
: Trunk
: All All
: -- normal (vote)
: Firefox 12
Assigned To: Tim Taubert [:ttaubert]
:
Mentors:
Depends on: CVE-2012-0476 722479
Blocks:
  Show dependency treegraph
 
Reported: 2012-01-26 09:12 PST by Tim Taubert [:ttaubert]
Modified: 2012-01-30 13:59 PST (History)
2 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
patch v1 (8.21 KB, patch)
2012-01-26 11:35 PST, Tim Taubert [:ttaubert]
dietrich: review+
Details | Diff | Splinter Review
patch v2 (9.34 KB, patch)
2012-01-26 16:35 PST, Tim Taubert [:ttaubert]
dietrich: review+
Details | Diff | Splinter Review

Description Tim Taubert [:ttaubert] 2012-01-26 09:12:08 PST
We need to use URI_DANGEROUS_TO_LOAD for the moz-page-thumb:// protocol because of bug 721398.
Comment 1 Tim Taubert [:ttaubert] 2012-01-26 11:35:29 PST
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.
Comment 2 Tim Taubert [:ttaubert] 2012-01-26 16:35:53 PST
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.
Comment 3 Dietrich Ayala (:dietrich) 2012-01-26 23:52:21 PST
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...
Comment 4 Tim Taubert [:ttaubert] 2012-01-27 02:39:11 PST
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.
Comment 5 Tim Taubert [:ttaubert] 2012-01-28 06:14:55 PST
https://hg.mozilla.org/mozilla-central/rev/9921aa6919e5

Note You need to log in before you can comment on or make changes to this bug.