Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / printing / css2.1 / page-break-after-002.html
blobc1276a16fa16780ebda57b7521d393d1d6c2f02f
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
2 <html>
3 <head>
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;}
13 p.noBreak {
14 display: inline;
16 </style>
17 <script src="../resources/paged-media-test-utils.js"></script>
18 <script>
20 if (window.testRunner)
21 testRunner.dumpAsText();
23 function test()
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);
32 </script>
33 </head>
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>
38 </body>
39 </html>