OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
4 <style type="text/css" media="screen"> | 4 <style type="text/css" media="screen"> |
5 .subpixelPusher { | 5 .subpixelPusher { |
6 position: relative; | 6 position: relative; |
7 top: 0.4px; | 7 top: 0.4px; |
8 } | 8 } |
9 .container { | 9 .container { |
10 display: inline-block; | 10 display: inline-block; |
11 } | 11 } |
12 </style> | 12 </style> |
13 <script src="../repaint/resources/repaint.js" type="text/javascript"></script> | 13 <script src="../../resources/run-after-display.js" type="text/javascript"></scri
pt> |
14 <script> | 14 <script> |
15 if (window.testRunner) { | 15 if (window.testRunner) { |
16 testRunner.waitUntilDone(); | 16 testRunner.waitUntilDone(); |
| 17 testRunner.dumpAsTextWithPixelResults(); |
17 internals.settings.setMockScrollbarsEnabled(true); | 18 internals.settings.setMockScrollbarsEnabled(true); |
18 } | 19 } |
19 | 20 |
20 function setupIframes() { | 21 function setupIframes() { |
21 setupIframe(document.getElementById('iframe1').contentWindow.document); | 22 setupIframe(document.getElementById('iframe1').contentWindow.document); |
22 setupIframe(document.getElementById('iframe2').contentWindow.document); | 23 setupIframe(document.getElementById('iframe2').contentWindow.document); |
23 document.getElementById('iframe1').contentWindow.scrollTo(0, 10); | 24 document.getElementById('iframe1').contentWindow.scrollTo(0, 10); |
24 } | 25 } |
25 | 26 |
26 function setupIframe(iframe) { | 27 function setupIframe(iframe) { |
27 iframe.open('text/html', 'replace'); | 28 iframe.open('text/html', 'replace'); |
28 iframe.write("<!DOCTYPE html>\n<html><body style=\"background-color: silver;he
ight: 1000px;\"></body>"); | 29 iframe.write("<!DOCTYPE html>\n<html><body style=\"background-color: silver;he
ight: 1000px;\"></body>"); |
29 iframe.close(); | 30 iframe.close(); |
30 } | 31 } |
31 | 32 |
32 function repaintTest() { | 33 function repaintTest() { |
33 document.getElementById('iframe1').contentWindow.scrollTo(0, 0); | 34 document.getElementById('iframe1').contentWindow.scrollTo(0, 0); |
34 document.getElementById('iframe2').contentWindow.scrollTo(0, 10); | 35 document.getElementById('iframe2').contentWindow.scrollTo(0, 10); |
35 if (window.testRunner) | 36 if (window.testRunner) |
36 testRunner.notifyDone(); | 37 testRunner.notifyDone(); |
37 } | 38 } |
38 </script> | 39 </script> |
39 </head> | 40 </head> |
40 <body onload="setupIframes();runRepaintTest()"> | 41 <body onload="setupIframes();runAfterDisplay(repaintTest);"> |
41 <p>The iframes below should remain grey with no repaint artifacts when scrolli
ng.</p> | 42 <p>The iframes below should remain grey with no repaint artifacts when scrolli
ng.</p> |
42 <div> | 43 <div> |
43 <div class="container"> | 44 <div class="container"> |
44 <div class="subpixelPusher"> | 45 <div class="subpixelPusher"> |
45 <div class="subpixelPusher"> | 46 <div class="subpixelPusher"> |
46 <iframe id="iframe1" style="width: 150px; height: 200px;"></iframe> | 47 <iframe id="iframe1" style="width: 150px; height: 200px;"></iframe> |
47 </div> | 48 </div> |
48 </div> | 49 </div> |
49 </div> | 50 </div> |
50 <div class="container"> | 51 <div class="container"> |
51 <div class="subpixelPusher"> | 52 <div class="subpixelPusher"> |
52 <div class="subpixelPusher"> | 53 <div class="subpixelPusher"> |
53 <iframe id="iframe2" style="width: 150px; height: 200px;"></iframe> | 54 <iframe id="iframe2" style="width: 150px; height: 200px;"></iframe> |
54 </div> | 55 </div> |
55 </div> | 56 </div> |
56 </div> | 57 </div> |
57 </div> | 58 </div> |
58 </body> | 59 </body> |
59 </html> | 60 </html> |
OLD | NEW |