OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 | 2 |
3 <html> | 3 <html> |
4 <head> | 4 <head> |
| 5 <script src="../../resources/run-after-display.js"></script> |
5 <style type="text/css" media="screen"> | 6 <style type="text/css" media="screen"> |
6 iframe { | 7 iframe { |
7 border: 10px solid black; | 8 border: 10px solid black; |
8 padding: 5px; | 9 padding: 5px; |
9 margin: 20px; | 10 margin: 20px; |
10 height: 150px; | 11 height: 150px; |
11 width: 300px; | 12 width: 300px; |
12 -webkit-box-shadow: 0 0 20px black; | 13 -webkit-box-shadow: 0 0 20px black; |
13 } | 14 } |
14 | 15 |
15 .overlay { | 16 .overlay { |
16 position: absolute; | 17 position: absolute; |
17 width: 50px; | 18 width: 50px; |
18 height: 50px; | 19 height: 50px; |
19 top: 5px; | 20 top: 5px; |
20 left: 5px; | 21 left: 5px; |
21 background-color: rgba(0, 0, 0, 0.2); | 22 background-color: rgba(0, 0, 0, 0.2); |
22 } | 23 } |
23 | 24 |
24 </style> | 25 </style> |
25 <script type="text/javascript" charset="utf-8"> | 26 <script type="text/javascript" charset="utf-8"> |
26 if (window.testRunner) { | 27 if (window.testRunner) { |
27 testRunner.dumpAsText(); | 28 testRunner.dumpAsText(); |
28 testRunner.waitUntilDone(); | 29 testRunner.waitUntilDone(); |
29 } | 30 } |
30 | 31 |
31 function doTest() | 32 function doTest() |
32 { | 33 { |
33 // For some reason this delay is required for AppKit to not short-circui
t the display. | 34 runAfterDisplay(function() { |
34 window.setTimeout(function() { | |
35 if (window.testRunner) | |
36 testRunner.display(); | |
37 | |
38 document.getElementById('parent-iframe').contentWindow.scrollTo(80,
80); | 35 document.getElementById('parent-iframe').contentWindow.scrollTo(80,
80); |
39 if (window.testRunner) { | 36 if (window.testRunner) { |
40 document.getElementById('layers').innerHTML = window.internals.l
ayerTreeAsText(document); | 37 document.getElementById('layers').innerHTML = window.internals.l
ayerTreeAsText(document); |
41 testRunner.notifyDone(); | 38 testRunner.notifyDone(); |
42 } | 39 } |
43 }, 0); | 40 }); |
44 } | 41 } |
45 | 42 |
46 window.addEventListener('load', doTest, false); | 43 window.addEventListener('load', doTest, false); |
47 </script> | 44 </script> |
48 </head> | 45 </head> |
49 <body> | 46 <body> |
50 | 47 |
51 <!-- Test scrolling in the iframe --> | 48 <!-- Test scrolling in the iframe --> |
52 <iframe id="parent-iframe" src="resources/large-composited-subframe.html"></
iframe> | 49 <iframe id="parent-iframe" src="resources/large-composited-subframe.html"></
iframe> |
53 | 50 |
54 <div class="overlay"> | 51 <div class="overlay"> |
55 </div> | 52 </div> |
56 | 53 |
57 <pre id="layers">Layer tree appears here in DRT.</pre> | 54 <pre id="layers">Layer tree appears here in DRT.</pre> |
58 </body> | 55 </body> |
59 </html> | 56 </html> |
OLD | NEW |