blob: c1276a16fa16780ebda57b7521d393d1d6c2f02f [file] [log] [blame]
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>CSS Test: page-break-after applies to blocks</title>
<link rel="author" href="" title="Tom Clancy">
<link rel="help" href="">
<link rel="help" href="">
<meta content="paged" name="flags">
<meta content="The 'page-break-after' property must be applied to block-level elements and may be applied to other elements." name="assert">
<style type="text/css">
p {page-break-after: always;}
p.noBreak {
display: inline;
<script src="../resources/paged-media-test-utils.js"></script>
if (window.testRunner)
function test()
pageNumberForElementShouldBe('test1', 1);
// As of February 2010, CSS spec says user agents may apply
// page-break-* to inline boxes. Though we are using 1 as the
// expected page number, 2 should be also OK.
pageNumberForElementShouldBe('test2', 1);
<body onload="runPrintingTest(test)">
<p>This sentence must be on the first page.</p>
<p class="noBreak" id="test1">This sentence must be on the second page.</p>
<p id="test2">This sentence must be either on the second or on the third page.</p>