reftests for pagination

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

reftests for pagination

Eli Friedman
Now that the patch for bug 374050 has landed
(https://bugzilla.mozilla.org/show_bug.cgi?id=374050), it is possible to
create reftests that run in a paginated context.

The page size used is 5in wide and 3in tall (with the default half-inch
margins).  This is to allow tests to have less text and to make the
entire test fit on the screen.

I created the directory layout/reftests/printing to contain reftests
that require pagination.

The suggested first lines for any printing test is
<!DOCTYPE html><html class="reftest-print">
<style>html{font-size:12pt}</style>

The reftest-print class on the root element triggers the reftest to
switch into page mode on load. Fixing the font size is suggested,
although not required, because the pages are a fixed size in inches.

The underlying layout support for this mode isn't really complete; it
doesn't use exactly the same codepath as real print preview/print. In
particular, scripting and frames are likely to cause problems; I haven't
tested it, though.  It also might not catch some painting regressions.
Overall, though, this should be a useful addition to the reftest framework.

-Eli
_______________________________________________
dev-tech-layout mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-layout
Reply | Threaded
Open this post in threaded view
|

Re: reftests for pagination

fantasai
Eli Friedman wrote:

> Now that the patch for bug 374050 has landed
> (https://bugzilla.mozilla.org/show_bug.cgi?id=374050), it is possible to
> create reftests that run in a paginated context.
>
> The page size used is 5in wide and 3in tall (with the default half-inch
> margins).  This is to allow tests to have less text and to make the
> entire test fit on the screen.
>
> I created the directory layout/reftests/printing to contain reftests
> that require pagination.
>
> The suggested first lines for any printing test is
> <!DOCTYPE html><html class="reftest-print">
> <style>html{font-size:12pt}</style>
>
> The reftest-print class on the root element triggers the reftest to
> switch into page mode on load. Fixing the font size is suggested,
> although not required, because the pages are a fixed size in inches.
>
> The underlying layout support for this mode isn't really complete; it
> doesn't use exactly the same codepath as real print preview/print. In
> particular, scripting and frames are likely to cause problems; I haven't
> tested it, though.  It also might not catch some painting regressions.
> Overall, though, this should be a useful addition to the reftest framework.

Eli, can you add this information to layout/tools/reftest/README.txt ?

~fantasai
_______________________________________________
dev-tech-layout mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-layout
Reply | Threaded
Open this post in threaded view
|

Re: reftests for pagination

Eli Friedman-2
On Jun 29, 9:46 am, fantasai <[hidden email]> wrote:

> Eli Friedman wrote:
> > Now that the patch for bug 374050 has landed
> > (https://bugzilla.mozilla.org/show_bug.cgi?id=374050), it is possible to
> > create reftests that run in a paginated context.
>
> > The page size used is 5in wide and 3in tall (with the default half-inch
> > margins).  This is to allow tests to have less text and to make the
> > entire test fit on the screen.
>
> > I created the directory layout/reftests/printing to contain reftests
> > that require pagination.
>
> > The suggested first lines for any printing test is
> > <!DOCTYPE html><html class="reftest-print">
> > <style>html{font-size:12pt}</style>
>
> > The reftest-print class on the root element triggers the reftest to
> > switch into page mode on load. Fixing the font size is suggested,
> > although not required, because the pages are a fixed size in inches.
>
> > The underlying layout support for this mode isn't really complete; it
> > doesn't use exactly the same codepath as real print preview/print. In
> > particular, scripting and frames are likely to cause problems; I haven't
> > tested it, though.  It also might not catch some painting regressions.
> > Overall, though, this should be a useful addition to the reftest framework.
>
> Eli, can you add this information to layout/tools/reftest/README.txt ?
>
> ~fantasai

Okay, done.

-Eli

_______________________________________________
dev-tech-layout mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-layout
Reply | Threaded
Open this post in threaded view
|

Re: reftests for pagination

fantasai
[hidden email] wrote:
> On Jun 29, 9:46 am, fantasai <[hidden email]> wrote:
>> Eli Friedman wrote:
>>> Now that the patch for bug 374050 has landed
>>> (https://bugzilla.mozilla.org/show_bug.cgi?id=374050), it is possible to
>>> create reftests that run in a paginated context.
>>> ...
>> Eli, can you add this information to layout/tools/reftest/README.txt ?
>
> Okay, done.

Thanks!

~fantasai
_______________________________________________
dev-tech-layout mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-layout
Reply | Threaded
Open this post in threaded view
|

Re: reftests for pagination

Roman Korchagin-2
In reply to this post by Eli Friedman
I'd love to see pagination tests, but what code base is this? I'm new to
code and downloaded seamonkey 1.1b source, it has layout, but no reftests in
it.

Thanks.

"Eli Friedman" <[hidden email]> wrote in message
news:[hidden email]...

> Now that the patch for bug 374050 has landed
> (https://bugzilla.mozilla.org/show_bug.cgi?id=374050), it is possible to
> create reftests that run in a paginated context.
>
> The page size used is 5in wide and 3in tall (with the default half-inch
> margins).  This is to allow tests to have less text and to make the entire
> test fit on the screen.
>
> I created the directory layout/reftests/printing to contain reftests that
> require pagination.
>
> The suggested first lines for any printing test is
> <!DOCTYPE html><html class="reftest-print">
> <style>html{font-size:12pt}</style>
>
> The reftest-print class on the root element triggers the reftest to switch
> into page mode on load. Fixing the font size is suggested, although not
> required, because the pages are a fixed size in inches.
>
> The underlying layout support for this mode isn't really complete; it
> doesn't use exactly the same codepath as real print preview/print. In
> particular, scripting and frames are likely to cause problems; I haven't
> tested it, though.  It also might not catch some painting regressions.
> Overall, though, this should be a useful addition to the reftest
> framework.
>
> -Eli

_______________________________________________
dev-tech-layout mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-layout
Reply | Threaded
Open this post in threaded view
|

Re: reftests for pagination

Boris Zbarsky
Roman Korchagin wrote:
> I'd love to see pagination tests, but what code base is this?

Trunk.

> I'm new to code and downloaded seamonkey 1.1b source, it has layout, but no
> reftests in it.

Right.  Seamonkey 1.1 comes off the Gecko 1.8 branch, which doesn't have any of
the unit test infrastructure.  You want to get a trunk build, but I don't think
we have trunk source tarballs available anymore.  Getting the source of one of
the recent alphas (of Seamonkey 2 or Firefox 3) would work.

-Boris

_______________________________________________
dev-tech-layout mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-layout