Update reftest documentation for printing reftests. NPOTB.
Fri, 29 Jun 2007 09:57:07 -0700
changeset 2941 ee2455231adb95fd47d014cb926abe9ff2772bb3
parent 2940 d4bb374a3db6c8d8b66a7f19332d603d73538cb0
child 2942 4209e16b58411750ac73f761023e46b76b793e2c
push idunknown
push userunknown
push dateunknown
Update reftest documentation for printing reftests. NPOTB.
--- a/layout/tools/reftest/README.txt
+++ b/layout/tools/reftest/README.txt
@@ -192,8 +192,36 @@ element, for example using this code:
     document.documentElement.className = "";
 Note that in layout tests it is often enough to trigger layout using 
     document.body.offsetWidth  // HTML example
 When possible, you should use this technique instead of making your
 test async.
+Printing Tests
+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.
+There is a layout/reftests/printing directory for printing reftests; however,
+there is nothing special about this directory.  You can put printing reftests
+anywhere that is appropriate.
+The suggested first lines for any printing test is
+<!DOCTYPE html><html class="reftest-print">
+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; it is untested,
+theough.  That said, it should be sufficient for testing layout issues related
+to pagination.