Upstream version 5.34.98.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / LayoutTests / fast / repaint / background-shorthand-with-gradient-and-height-changes.html
1 <html>
2 <head>
3 <script>jsTestIsAsync = true;</script>
4 <script src="../../resources/js-test.js"></script>
5
6 <style>
7 #outer {
8     padding-top: 200px;
9     /* background-size is implicitly set to initial via the background shorthand. */
10         background:-webkit-gradient(
11             linear, 
12             left top, 
13             left bottom, 
14             color-stop(0%, rgba(255,255,0,0)), color-stop(100%, rgba(0,0,0,1))
15         );
16 }
17
18 #inner {
19     height: 100px;
20 }
21 </style>
22
23 <script>
24 description("This test verifies that gradient background gets repainted properly after child box height change.");
25
26 function start() {
27     window.setTimeout(function() { 
28         document.getElementById('inner').style.height = 300 + 'px'; 
29         window.setTimeout(logRepaints, 200);
30     }, 0); 
31
32     if (!window.testRunner || !window.internals)
33         return;
34         
35     window.internals.startTrackingRepaints(document);
36     window.testRunner.display();
37 }
38
39 function logRepaints() {
40     if (!window.internals)
41         return;
42         
43     repaintRects = window.internals.repaintRectsAsText(document);
44     window.internals.stopTrackingRepaints(document);
45     shouldNotBe("repaintRects.indexOf('500')", "-1");
46     finishJSTest();
47 }
48 </script>
49 </head>
50
51 <body onload='start();'>
52 <div id='outer'>
53     <div id='inner'>
54     </div>
55 </div>
56 </body>
57 </html>