Closed
Bug 501100
Opened 16 years ago
Closed 16 years ago
Print preview mochitests should be chrome tests
Categories
(Core :: Layout, defect)
Core
Layout
Tracking
()
RESOLVED
FIXED
mozilla1.9.2a1
People
(Reporter: roc, Assigned: roc)
References
Details
Attachments
(1 file)
|
25.09 KB,
patch
|
martijn.martijn
:
review+
|
Details | Diff | Splinter Review |
In layout/base/tests we have a few tests that use chrome privileges to put a content IFRAME of a content document into print preview mode. My work in bug 352093 breaks these tests because the print engine doesn't know how to print a document that has no widget. Hacking the print engine to handle that is quite difficult, and pointless since there is no legitimate use for putting an IFRAME of a content document into print preview mode.
So we should convert these tests to chrome tests and run them in a chrome window so that the IFRAME to be printed is a child of chrome, like the browser's print preview. This means we don't need enablePrivilege, which is also nice. It means onload on the iframe doesn't fire, so instead I have the iframe call a function in its parent document.
Attachment #385718 -
Flags: review?(martijn.martijn)
Comment 1•16 years ago
|
||
(In reply to comment #0)
> ... and pointless since there is no legitimate use for putting an IFRAME
> of a content document into print preview mode.
Huh? I'm using that a lot in my testing, actually. Why is there no legitimate use for it? Or do you mean there is currently no legitimate use for it?
| Assignee | ||
Comment 2•16 years ago
|
||
I mean there is no real use for it for actual users of the browser (Web developers and chrome/extension developers). I know you do a lot of good testing with it, but you can do that testing using chrome tests (I hope) like the tests I've converted here.
Comment 3•16 years ago
|
||
Comment on attachment 385718 [details] [diff] [review]
fix
Sorry for the delay, I had horrible problems with Mercurial.
In bug482976_helper.xul, you add:
+<iframe src="data:text/html;charset=utf-8,<body onload='window.parent.loadedChild()'>"></iframe>
, but the original file, test_bug482976.html, had:
-<iframe onload="SimpleTest.waitForExplicitFinish(); setTimeout(run1, 0); this.removeAttribute('onload')"
- src="data:text/html,<q>"></iframe>
This is what bug 482976 was about, the fact that <q> tags caused crashes on print preview. So please add that back in your patch.
The tests seem to run fine on my machine, btw.
I'm still looking at the rest.
Comment 4•16 years ago
|
||
Comment on attachment 385718 [details] [diff] [review]
fix
The rest looks ok to me.
Attachment #385718 -
Flags: review?(martijn.martijn) → review+
| Assignee | ||
Comment 5•16 years ago
|
||
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
| Assignee | ||
Comment 7•16 years ago
|
||
I did:
+<iframe src="data:text/html;charset=utf-8,<body onload='window.parent.loadedChild()'><q>"></iframe>
Comment 8•16 years ago
|
||
Sorry, I misread the patch.
Comment 9•15 years ago
|
||
A just landed checkin referenced this bug as "followup to Bug 501100" but since the followup was never mentioned here, I'm doing so now: Bug 556686
Updated•15 years ago
|
You need to log in
before you can comment on or make changes to this bug.
Description
•