1<!DOCTYPE html> 2<html> 3<head> 4<script src="/resources/testharness.js"></script> 5<script src="/resources/testharnessreport.js"></script> 6<script src="/resources/testdriver.js"></script> 7<script src="/resources/testdriver-actions.js"></script> 8<script src="/resources/testdriver-vendor.js"></script> 9<style> 10 11body { margin: 0; padding: 10px; } 12.space { height: 2000px; } 13 14#scroller { 15 border: 3px solid green; 16 position: absolute; 17 z-index: 0; 18 overflow: auto; 19 padding: 10px; 20 width: 250px; 21 height: 150px; 22} 23 24.ifr { 25 border: 3px solid blue; 26 width: 200px; 27 height: 100px; 28} 29 30</style> 31</head> 32<body> 33<div id=scroller> 34 <iframe srcdoc="SCROLL ME" class=ifr></iframe> 35 <div class=space></div> 36</div> 37<div class=space></div> 38<script> 39 40promise_test(async t => { 41 await new test_driver.Actions().scroll(50, 50, 0, 50).send(); 42 // Allow the possibility the scroll is not fully synchronous 43 await t.step_wait(() => scroller.scrollTop === 50); 44}, "Wheel scroll in iframe chains to containing element."); 45 46</script> 47</body> 48</html> 49