Last Comment Bug 677002 - Various docshell tests no longer work correctly with WindowSnapshot converted to SpecialPowers
: Various docshell tests no longer work correctly with WindowSnapshot converted...
Status: RESOLVED FIXED
[qa-]
: regression
Product: Testing
Classification: Components
Component: Mochitest (show other bugs)
: Trunk
: All All
: -- normal (vote)
: mozilla9
Assigned To: Boris Zbarsky [:bz] (Out June 25-July 6)
:
Mentors:
Depends on:
Blocks: 666643
  Show dependency treegraph
 
Reported: 2011-08-05 19:24 PDT by Boris Zbarsky [:bz] (Out June 25-July 6)
Modified: 2011-10-13 10:45 PDT (History)
8 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
-
fixed


Attachments
Back out the non-SpecialPowers parts of (3.27 KB, patch)
2011-09-22 19:19 PDT, Boris Zbarsky [:bz] (Out June 25-July 6)
khuey: review+
asa: approval‑mozilla‑beta+
Details | Diff | Review
fix windowsnapshot calls in chrome (1.0) (12.05 KB, patch)
2011-09-23 05:46 PDT, Joel Maher (:jmaher)
bzbarsky: review-
Details | Diff | Review

Description Boris Zbarsky [:bz] (Out June 25-July 6) 2011-08-05 19:24:23 PDT
There are tests using WindowSnapshot in chrome windows. Unfortunately, SpecialPowers only gets set up for content tabs.  Even more unfortunately, bug 652494 means that the tests are happily passing without testing anything as a result.  :(

This is a regression from bug 666643, so luckily a recent-ish regression.  But in the meantime, we're missing test coverage...  Requesting tracking for his regression.
Comment 1 Boris Zbarsky [:bz] (Out June 25-July 6) 2011-08-05 19:27:08 PDT
I can fix this for tests using docshell_helpers.js by adding SpecialPowers to the imports array.  But there may well be other tests that need a working WindowSnapshot in a chrome window as well...
Comment 2 Joel Maher (:jmaher) 2011-08-07 18:32:33 PDT
interesting.  I wonder why I haven't seen this failing.  I need to add SpecialPowers to docshell_helpers.js for a waitForFocus patch.  I can look through the chrome tests which use snapshotWindow and verify the snapshots are correct and there are no silent failures or ignored tests.
Comment 3 Boris Zbarsky [:bz] (Out June 25-July 6) 2011-08-07 19:17:01 PDT
> I wonder why I haven't seen this failing. 

Because the tests pass; they just don't actually test anything.  Again, see bug 652494.

Maybe we should grep the output that we do log for exceptions in chrome tests for this particular failure?  Not sure whether the logging actually logs the exception message...
Comment 4 Joel Maher (:jmaher) 2011-08-08 11:18:41 PDT
I verified these tests all work fine:
content/xul/content/test/test_bug398289.html
editor/libeditor/text/tests/test_bug636465.xul
layout/generic/test/test_bug469774.xul
modules/libpr0n/test/mochitest/test_animSVGImage.html
toolkit/components/places/tests/chrome/test_favicon_annotations.xul
toolkit/content/tests/chrome/bug451286_window.xul

This test I needed to edit, but already had edited in one of my working patches:
chrome/layout/base/test/chrome/test_chrome_content_integration.xul (specifically fixed in my patch)
Comment 5 Asa Dotzler [:asa] 2011-09-22 14:43:41 PDT
release drivers aren't going to be tracking this.
Comment 6 Boris Zbarsky [:bz] (Out June 25-July 6) 2011-09-22 14:54:50 PDT
> release drivers aren't going to be tracking this.

Why not?  We no longer have test coverage on a good chunk of docshell stuff, so have no idea whether things have regressed....

Joel, this looks like it dropped off your plate.  :(
Comment 7 Boris Zbarsky [:bz] (Out June 25-July 6) 2011-09-22 19:19:15 PDT
Created attachment 561954 [details] [diff] [review]
Back out the non-SpecialPowers parts of
Comment 8 Boris Zbarsky [:bz] (Out June 25-July 6) 2011-09-22 19:20:38 PDT
Actually, just taking.  We need to fix this, on trunk and aurora, so we have something like test coverage.

I'm just backing out bug 666643 for now until it can be done right.
Comment 9 Joel Maher (:jmaher) 2011-09-23 05:46:47 PDT
Created attachment 562022 [details] [diff] [review]
fix windowsnapshot calls in chrome (1.0)

this patch fixes the docshell tests and 1 layout test which call snapshotwindow from chrome instead of mochitest plain.
Comment 10 Boris Zbarsky [:bz] (Out June 25-July 6) 2011-09-23 08:54:52 PDT
Comment on attachment 562022 [details] [diff] [review]
fix windowsnapshot calls in chrome (1.0)

I don't think this is the right approach.  I'll comment on what I think is the right thing in bug 666643 when I reopen it...
Comment 11 Boris Zbarsky [:bz] (Out June 25-July 6) 2011-09-23 09:28:27 PDT
http://hg.mozilla.org/integration/mozilla-inbound/rev/76d641ec4a44
Comment 12 Boris Zbarsky [:bz] (Out June 25-July 6) 2011-09-23 09:30:29 PDT
Comment on attachment 561954 [details] [diff] [review]
Back out the non-SpecialPowers parts of

Asking for aurora approval to restore test coverage there.
Comment 14 Asa Dotzler [:asa] 2011-09-27 14:19:56 PDT
Comment on attachment 561954 [details] [diff] [review]
Back out the non-SpecialPowers parts of

go for it. approval-mozilla-beta+
Comment 15 Boris Zbarsky [:bz] (Out June 25-July 6) 2011-09-28 09:43:22 PDT
https://hg.mozilla.org/releases/mozilla-beta/rev/1cc47e765a5b
Comment 16 Anthony Hughes (:ashughes) [GFX][QA][Mentor] 2011-10-13 10:45:37 PDT
qa- as nothing to do for QA fix verification -- please reset to qa+ if there is something for QA to verify.

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