chromium/third_party/blink/web_tests/printing/css2.1/page-break-inside-000.html

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>CSS Test: page-break-inside:auto</title>
<link rel="author" href="mailto:[email protected]" title="Tom Clancy">
<link rel="author" href="http://www.hp.com/" title="Hewlett-Packard Company">
<link rel="help" href="http://www.w3.org/TR/CSS21/page.html#page-break-props">
<link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#the-height-property">
<link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#containing-block-details">
<meta content="paged" name="flags">
<meta content="The 'auto' value of the 'page-break-inside' property neither forces nor forbids a page break inside the box." name="assert">
<style type="text/css">
    html,body {
        font-size:12pt;
        line-height:1;
        height:100%;
        margin:0;
    }
    .marginDiv1, .marginDiv2 {
        height:50%;
    }
    .marginDiv2 {
        margin-top:-5em;
    }
    div.break {
        page-break-inside:auto;
        width:4em;
    }
</style>
<script src="../resources/paged-media-test-utils.js"></script>
<script>

    if (window.testRunner)
        testRunner.dumpAsText();

    function test()
    {
        pageNumberForElementShouldBe('test1', 0);
        pageNumberForElementShouldBe('test2', 1);
    }

</script>
</head>
<body onload="runPrintingTest(test)">
    <div class="marginDiv1"></div>
    <div class="marginDiv2"></div>
    <div>There must be a page break below between &quot;FIRST&quot; and &quot;LAST&quot;</div>
    <div class="break">
        <span id="test1">FIRST</span>
        dummy
        dummy
        dummy
        dummy
        dummy
        dummy
        dummy
        dummy
        dummy
        <span id="test2">FIRST</span>
    </div>
</body>
</html>