layout/reftests/image-rect/background-draw-nothing-invalid-syntax.html

Fri, 16 Jan 2015 04:50:19 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Fri, 16 Jan 2015 04:50:19 +0100
branch
TOR_BUG_9701
changeset 13
44a2da4a2ab2
permissions
-rw-r--r--

Replace accessor implementation with direct member state manipulation, by
request https://trac.torproject.org/projects/tor/ticket/9701#comment:32

     1 <!DOCTYPE html>
     2 <!--
     3     Any copyright is dedicated to the Public Domain.
     4     http://creativecommons.org/licenses/publicdomain/
     6     Tests if the CSS parser can detect wrong syntax of -moz-image-rect() and
     7     gracefully fail.
     8 -->
     9 <html>
    10   <head>
    11     <title>Testcases: -moz-image-rect() [bug 113577]</title>
    12     <style>
    13       div.wrapper {
    14         width: 32px;
    15         height: 32px;
    16         margin: 10px;
    17         background-color: red;
    18       }
    19       div.wrapper div {
    20         width: 32px;
    21         height: 32px;
    22         background: no-repeat;
    23       }
    24       #test1 {
    25         /* only non-negative values accepted */
    26         background-image: -moz-image-rect(url(green-16x16-in-blue-32x32.png), -1, 16, 16, 0);
    27       }
    28       #test2 {
    29         /* only bare numbers and percent values accepted */
    30         background-image: -moz-image-rect(url(green-16x16-in-blue-32x32.png), 0px, 16, 16, 0);
    31       }
    32       #test3 {
    33         /* must have a complete set of <top>, <right>, <bottom>, <left> */
    34         background-image: -moz-image-rect(url(green-16x16-in-blue-32x32.png), 16, 16);
    35       }
    36       #test4 {
    37         /* must be comma separated */
    38         background-image: -moz-image-rect(url(green-16x16-in-blue-32x32.png)  0, 16, 16, 0);
    39       }
    40     </style>
    41   </head>
    42   <body>
    43     <div class="wrapper"><div id="test1"></div></div>
    44     <div class="wrapper"><div id="test2"></div></div>
    45     <div class="wrapper"><div id="test3"></div></div>
    46     <div class="wrapper"><div id="test4"></div></div>
    47   </body>
    48 </html>

mercurial