summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/fast/css/getPropertyValue-clip.html
blob: 9c27ac1b42873444c113e7e78688c20241406fcf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
<html lang="en">
 <head>
  <title>clip computed style</title>
 <style type="text/css">
   div { height: 5em; width: 10em; font-size:12px }
  </style>
  <script>
    function log(message) {
      var console = document.getElementById("console");
      console.appendChild(document.createTextNode(message + "\n"));
    }
    function runTest() {
      if (window.testRunner) 
        testRunner.dumpAsText();
      var div = document.getElementById("clip");
      if (getComputedStyle(div,'').getPropertyValue("clip") != "rect(5px 24px 1px 12px)") {
          log("FAILED");
          return;
      }
      div = document.getElementById("clip2");
      if (getComputedStyle(div,'').getPropertyValue("clip") != "auto") {
          log("FAILED");
          return;
      }
      log("PASSED");
    }
  </script>
 </head>
 <body onload="runTest()">
  <div id="clip" style="clip: rect(5px, 2em, 1px, 1em)" ></div>
  <div id="clip2" style="clip: auto" ></div>
  <div id="console"></div>
 </body>
</html>