summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/transitions/shadow.html
blob: 0e50cbef8b7de0159004204e501e76b57d7fce5a (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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
<!DOCTYPE html>

<html>
<head>
  <style>
    #box1 {
      height: 100px;
      width: 100px;
      background-color: blue;
      -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.5);
      -webkit-transition-duration: 0.1s;
      -webkit-transition-timing-function: linear;
      -webkit-transition-property: -webkit-box-shadow;
    }
    #box2 {
      height: 100px;
      width: 100px;
      background-color: blue;
      -webkit-transition-duration: 0.1s;
      -webkit-transition-timing-function: linear;
      -webkit-transition-property: -webkit-box-shadow;
    }
  </style>
  <script>
    if (window.testRunner) {
        testRunner.dumpAsText();
        testRunner.waitUntilDone();
    }
    
    function start()
    {
        var box1 = document.getElementById('box1');
        box1.style.webkitBoxShadow = 'none';
        var box2 = document.getElementById('box2');
        box2.style.webkitBoxShadow = '5px 5px 5px rgba(0, 0, 0, 0.5)';
        window.setTimeout(function() {
              document.getElementById('result').innerHTML = "PASS";
              if (window.testRunner)
                  testRunner.notifyDone();
          }, 300);
    }
    
    window.addEventListener('load', start, false);
  </script>
</head>
<body>

<p>
First box should transition to no shadow. Second should transition to a shadow.
</p>
<div id="box1">
</div>
<div id="box2">
</div>
<div id="result">
</div>
</body>
</html>