Chromium Code Reviews| Index: LayoutTests/fast/events/resources/body-overflow-iframe.html |
| diff --git a/LayoutTests/fast/events/resources/body-overflow-iframe.html b/LayoutTests/fast/events/resources/body-overflow-iframe.html |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..396333f47de5a4ad8efc38f7bfbc6dd684e33362 |
| --- /dev/null |
| +++ b/LayoutTests/fast/events/resources/body-overflow-iframe.html |
| @@ -0,0 +1,39 @@ |
| +<!DOCTYPE html> |
| +<style> |
| +html, body { |
| + height: 100px; |
| + width: 100px; |
| + background: green; |
| + padding: 0; |
| + margin: 0; |
| +} |
| + |
| +div#child { |
| + position: relative; |
| + top : 700px; |
| + width: 50px; |
| + height: 300px; |
| + background: red; |
| +} |
| + |
| +</style> |
| +<body> |
| + <div id='child'></div> |
| +</body> |
| + |
| +<script> |
| +document.addEventListener("contextmenu", function(){ |
| + top.debug("PASS context_menu_triggered in iframe"); |
| +}); |
| + |
| +document.addEventListener("click", function(){ |
| + top.debug("PASS click_triggered in iframe"); |
| +}); |
| + |
| +window.onload = function(evt) { |
| + document.documentElement.scrollTop = "1000"; |
|
Rick Byers
2015/08/20 19:28:22
nit: please use document.scrollingElement in case
Yufeng Shen (Slow to review)
2015/08/20 20:28:18
Done.
|
| + top.debug("iframe's scroll top is " + document.documentElement.scrollTop); |
| + top.postMessage("subframe-loaded", "*"); |
| +} |
| + |
| +</script> |