1 <!DOCTYPE HTML PUBLIC
"-//W3C//DTD HTML 4.01//EN">
4 <meta http-equiv=
"Content-Type" content=
"text/html;charset=UTF-8">
5 <title>CSS Test: page-break-after applies to blocks
</title>
6 <link rel=
"author" href=
"mailto:tclancy@revenution.com" title=
"Tom Clancy">
7 <link rel=
"help" href=
"http://www.w3.org/TR/CSS21/page.html#page-break-props">
8 <link rel=
"help" href=
"http://www.w3.org/TR/css3-page/#pg-br-before-after">
9 <meta content=
"paged" name=
"flags">
10 <meta content=
"The 'page-break-after' property must be applied to block-level elements and may be applied to other elements." name=
"assert">
11 <style type=
"text/css">
12 p
{page-break-after: always
;}
17 <script src=
"../resources/paged-media-test-utils.js"></script>
20 if (window
.testRunner
)
21 testRunner
.dumpAsText();
25 pageNumberForElementShouldBe('test1', 1);
26 // As of February 2010, CSS spec says user agents may apply
27 // page-break-* to inline boxes. Though we are using 1 as the
28 // expected page number, 2 should be also OK.
29 pageNumberForElementShouldBe('test2', 1);
34 <body onload=
"runPrintingTest(test)">
35 <p>This sentence must be on the first page.
</p>
36 <p class=
"noBreak" id=
"test1">This sentence must be on the second page.
</p>
37 <p id=
"test2">This sentence must be either on the second or on the third page.
</p>