Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / paint / invalidation / spv2 / obscured-background-no-repaint.html
blob4b18cfb25f1272eccc9e4f4cbebcf6c91388b3ce
1 <!-- Based on fast/repaint/obscured-background-no-repaint.html -->
2 <html>
3 <head>
4 <script src="../../../fast/repaint/../../resources/run-after-layout-and-paint.js"></script>
5 <script src="resources/paint-invalidation-test.js"></script>
6 <style type="text/css">
7 #test1 div {
8 height: 100px;
9 width: 100px;
11 #test1 .parent {
12 background-image: url(../../../fast/repaint/resources/animated.gif)
14 #test1 .child {
15 background-color: green;
18 #test2 .parent {
19 position: relative;
20 height: 100px;
21 width: 100px;
22 background-image: url(../../../fast/repaint/resources/animated.gif);
23 background-repeat: no-repeat;
24 background-position: center;
27 #test2 .child {
28 background-color: green;
29 position: relative;
30 left: 25px;
31 top: 25px;
32 height: 50px;
33 width: 50px;
35 #test3 img {
36 background-image: url(../../../fast/repaint/resources/animated.gif)
38 #test4 .parent {
39 position: relative;
40 height: 100px;
41 width: 100px;
42 background-color: red;
43 background-repeat: no-repeat;
44 background-position: center;
45 background-image: url(../../../fast/repaint/resources/animated.gif)
47 </style>
48 <script>
49 // Test that obscured animated gif does not trigger repaints.
50 if (window.testRunner) {
51 testRunner.waitUntilDone();
52 testRunner.dumpAsText();
54 window.testIsAsync = true;
55 window.expectedPaintInvalidationObjects = [
57 function paintInvalidationTest()
59 runAfterLayoutAndPaint(finishPaintInvalidationTest);
62 function start() {
63 if (!window.testRunner || !window.internals)
64 return;
66 var img = new Image();
67 img.onload = runPaintInvalidationTest;
68 img.src = "../../../fast/repaint/resources/animated.gif";
70 </script>
71 </head>
72 <body onload="start()">
73 <div id="test1">
74 <div class="parent">
75 <div class="child">
76 </div>
77 </div>
78 </div>
79 <div id="test2">
80 <div class="parent">
81 <div class="child">
82 </div>
83 </div>
84 </div>
85 <div id="test3">
86 <img src="../../../fast/repaint/resources/apple.jpg">
87 </div>
88 <div id="test4">
89 <div class="parent">
90 <a>
91 <div></div>
92 <div>
93 <img src="../../../fast/repaint/resources/apple.jpg">
94 </div>
95 </a>
96 </div>
97 </div>
98 </body>
99 </html>