OLD | NEW |
| (Empty) |
1 <!DOCTYPE html> | |
2 <script> | |
3 if (window.testRunner) { | |
4 testRunner.dumpAsText(); | |
5 testRunner.waitUntilDone(); | |
6 } | |
7 </script> | |
8 <p>This tests that we don't get into an infinite resize event loop with seamless
iframes. Passes if it doesn't hang.</p> | |
9 <iframe seamless srcdoc="<!DOCTYPE html> | |
10 <script> | |
11 function notifyDone() { | |
12 if (window.testRunner) | |
13 testRunner.notifyDone(); | |
14 } | |
15 | |
16 var timer; | |
17 window.onresize = function() { | |
18 clearTimeout(timer); | |
19 // We sometimes yield to the event loop even in the hang case, | |
20 // so notifyDone on a setTimeout to avoid brief yields. | |
21 timer = setTimeout(notifyDone, 100); | |
22 | |
23 document.body.style.height = (Math.random() * 450) + 'px'; | |
24 document.body.offsetHeight; | |
25 } | |
26 </script> | |
27 <body onload='window.onresize()'></body>"></iframe> | |
28 <script> | |
29 document.querySelector('iframe').offsetHeight; | |
30 </script> | |
OLD | NEW |