Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / compositing / overflow / resources / scrolls-with-respect-to-iframe.html
blob39a57bb67affeef78e720ca194e254877e299403
1 <html id='iframe-root'>
2 <head>
3 <style>
4 div {
5 width: 100px;
6 height: 100px;
7 border: 1px solid black;
10 #iframe-abs-div {
11 position: absolute;
12 background-color: red;
13 left: 100px;
16 #iframe-fixed-div {
17 position: fixed;
18 background-color: blue;
19 left: 200px;
21 </style>
23 <script>
24 if (window.testRunner)
25 testRunner.dumpAsText();
27 function doTest()
29 var pre = document.getElementById('iframe-console');
30 var tosend = '';
31 if(!window.internals)
32 return;
34 var divs = ['iframe-div', 'iframe-abs-div', 'iframe-fixed-div', 'iframe-root'];
35 for (var i = 0; i < divs.length; i++) {
36 var div1 = document.getElementById(divs[i]);
37 for (var j = 0; j < divs.length; j++) {
38 var div2 = document.getElementById(divs[j]);
39 var scrollsWithRespectTo = window.internals.scrollsWithRespectTo(div1, div2);
41 var successText = scrollsWithRespectTo ? 'scrolls with respect to' : 'does not scroll with respect to';
42 var messageText = div1.id + ' ' + successText + ' ' + div2.id;
43 tosend += messageText + '\n';
46 window.top.postMessage(tosend, '*');
49 window.onload = doTest;
50 </script>
51 </head>
53 <body>
54 <div id='iframe-div' style='overflow:scroll'></div>
55 <div id='iframe-abs-div'></div>
56 <div id='iframe-fixed-div'></div>
57 <div></div>
58 <div></div>
59 <div></div>
60 <div></div>
61 <pre id='iframe-console'></pre>
62 </body>
63 </html>