blob: d662bd98c95d1b14d2a31b1d435324f313273c37 [file] [log] [blame]
This tests page format data
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
Test default visibility
PASS layoutTestController.isPageBoxVisible(0) is true
Test display: none. display property doesn't apply to @page
PASS layoutTestController.isPageBoxVisible(0) is true
Test display: inline. display property doesn't apply to @page
PASS layoutTestController.isPageBoxVisible(0) is true
Test visibility: hidden
PASS layoutTestController.isPageBoxVisible(0) is false
Test visibility: visible
PASS layoutTestController.isPageBoxVisible(0) is true
Test default page size
PASS layoutTestController.pageSizeAndMarginsInPixels(0, 100, 200, 1, 2, 3, 4) is '(100, 200)' + pxMargins(1, 2, 3, 4)
Test auto page size
PASS layoutTestController.pageSizeAndMarginsInPixels(0, 100, 200, 1, 2, 3, 4) is '(100, 200)' + pxMargins(1, 2, 3, 4)
Test landscape
PASS layoutTestController.pageSizeAndMarginsInPixels(0, 100, 200, 1, 2, 3, 4) is '(200, 100)' + pxMargins(1, 2, 3, 4)
PASS layoutTestController.pageSizeAndMarginsInPixels(0, 200, 100, 1, 2, 3, 4) is '(200, 100)' + pxMargins(1, 2, 3, 4)
Test portrait
PASS layoutTestController.pageSizeAndMarginsInPixels(0, 100, 200, 1, 2, 3, 4) is '(100, 200)' + pxMargins(1, 2, 3, 4)
PASS layoutTestController.pageSizeAndMarginsInPixels(0, 200, 100, 1, 2, 3, 4) is '(100, 200)' + pxMargins(1, 2, 3, 4)
Test a5
PASS layoutTestController.pageSizeAndMarginsInPixels(0, 100, 200, 1, 2, 3, 4) is mmSize(148, 210) + pxMargins(1, 2, 3, 4)
Test a5 landscape
PASS layoutTestController.pageSizeAndMarginsInPixels(0, 100, 200, 1, 2, 3, 4) is mmSize(210, 148) + pxMargins(1, 2, 3, 4)
Test portrait a4
PASS layoutTestController.pageSizeAndMarginsInPixels(0, 100, 200, 1, 2, 3, 4) is mmSize(210, 297) + pxMargins(1, 2, 3, 4)
Test a3
PASS layoutTestController.pageSizeAndMarginsInPixels(0, 100, 200, 1, 2, 3, 4) is mmSize(297, 420) + pxMargins(1, 2, 3, 4)
Test b5
PASS layoutTestController.pageSizeAndMarginsInPixels(0, 100, 200, 1, 2, 3, 4) is mmSize(176, 250) + pxMargins(1, 2, 3, 4)
Test b4
PASS layoutTestController.pageSizeAndMarginsInPixels(0, 100, 200, 1, 2, 3, 4) is mmSize(250, 353) + pxMargins(1, 2, 3, 4)
Test letter
PASS layoutTestController.pageSizeAndMarginsInPixels(0, 100, 200, 1, 2, 3, 4) is inchSize(8.5, 11) + pxMargins(1, 2, 3, 4)
Test legal
PASS layoutTestController.pageSizeAndMarginsInPixels(0, 100, 200, 1, 2, 3, 4) is inchSize(8.5, 14) + pxMargins(1, 2, 3, 4)
Test ledger
PASS layoutTestController.pageSizeAndMarginsInPixels(0, 100, 200, 1, 2, 3, 4) is inchSize(11, 17) + pxMargins(1, 2, 3, 4)
Test 10cm
PASS layoutTestController.pageSizeAndMarginsInPixels(0, 100, 200, 1, 2, 3, 4) is mmSize(100, 100) + pxMargins(1, 2, 3, 4)
Test 20cm x 30cm
PASS layoutTestController.pageSizeAndMarginsInPixels(0, 100, 200, 1, 2, 3, 4) is mmSize(200, 300) + pxMargins(1, 2, 3, 4)
Test 10000px 20000px
PASS layoutTestController.pageSizeAndMarginsInPixels(0, 100, 200, 1, 2, 3, 4) is '(10000, 20000)' + pxMargins(1, 2, 3, 4)
Test invalid page size: -10cm
PASS layoutTestController.pageSizeAndMarginsInPixels(0, 100, 200, 1, 2, 3, 4) is '(10000, 20000)' + pxMargins(1, 2, 3, 4)
Test invalid page size: a4 a4
PASS layoutTestController.pageSizeAndMarginsInPixels(0, 100, 200, 1, 2, 3, 4) is '(10000, 20000)' + pxMargins(1, 2, 3, 4)
Test invalid page size: landscape portrait
PASS layoutTestController.pageSizeAndMarginsInPixels(0, 100, 200, 1, 2, 3, 4) is '(10000, 20000)' + pxMargins(1, 2, 3, 4)
Test invalid page size: 10cm letter
PASS layoutTestController.pageSizeAndMarginsInPixels(0, 100, 200, 1, 2, 3, 4) is '(10000, 20000)' + pxMargins(1, 2, 3, 4)
Test invalid page size: 10cm 10cm 10cm
PASS layoutTestController.pageSizeAndMarginsInPixels(0, 100, 200, 1, 2, 3, 4) is '(10000, 20000)' + pxMargins(1, 2, 3, 4)
Test invalid page size: empty
PASS layoutTestController.pageSizeAndMarginsInPixels(0, 100, 200, 1, 2, 3, 4) is '(10000, 20000)' + pxMargins(1, 2, 3, 4)
Test 0px margins
PASS layoutTestController.pageSizeAndMarginsInPixels(0, 100, 200, 1, 2, 3, 4) is '(10000, 20000)' + pxMargins(0, 0, 0, 0)
Test non-zero margins
PASS layoutTestController.pageSizeAndMarginsInPixels(0, 100, 200, 1, 2, 3, 4) is '(10000, 20000)' + pxMargins(10, 20, 40, 80)
Test percentage margin
PASS layoutTestController.pageSizeAndMarginsInPixels(0, 100, 200, 1, 2, 3, 4) is '(10000, 20000)' + pxMargins(800, 400, 200, 100)
Test margin: auto 4% 2% 1%
PASS layoutTestController.pageSizeAndMarginsInPixels(0, 100, 200, 1, 2, 3, 4) is '(10000, 20000)' + pxMargins(1, 400, 200, 100)
Test margin: 8% auto 2% 1%
PASS layoutTestController.pageSizeAndMarginsInPixels(0, 100, 200, 1, 2, 3, 4) is '(10000, 20000)' + pxMargins(800, 2, 200, 100)
Test margin: 8% 4% auto 1%
PASS layoutTestController.pageSizeAndMarginsInPixels(0, 100, 200, 1, 2, 3, 4) is '(10000, 20000)' + pxMargins(800, 400, 3, 100)
Test margin: 8% 4% 2% auto
PASS layoutTestController.pageSizeAndMarginsInPixels(0, 100, 200, 1, 2, 3, 4) is '(10000, 20000)' + pxMargins(800, 400, 200, 4)
Test visibility: hidden
PASS layoutTestController.pageSizeAndMarginsInPixels(0, 100, 200, 1, 2, 3, 4) is '(10000, 20000)' + pxMargins(800, 400, 200, 4)
PASS successfullyParsed is true
TEST COMPLETE