Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(147)

Unified Diff: third_party/WebKit/LayoutTests/fast/events/autoscroll-upwards-propagation-no-scroll-iframe.html

Issue 1365853003: LayoutBox::scrollRectToVisible doesn't respect overflow:hidden property. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nits Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/events/autoscroll-upwards-propagation-no-scroll-iframe-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/fast/events/autoscroll-upwards-propagation-no-scroll-iframe.html
diff --git a/third_party/WebKit/LayoutTests/fast/events/autoscroll-upwards-propagation-no-scroll-iframe.html b/third_party/WebKit/LayoutTests/fast/events/autoscroll-upwards-propagation-no-scroll-iframe.html
new file mode 100644
index 0000000000000000000000000000000000000000..ed2eaba91144662de9cdf1191ba0d99e5d276dee
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/fast/events/autoscroll-upwards-propagation-no-scroll-iframe.html
@@ -0,0 +1,40 @@
+<!DOCTYPE html>
+<script src="../../resources/js-test.js"></script>
+<script type="text/javascript">
+ setPrintTestResultsLazily();
+ jsTestIsAsync = true;
+ description("This test ensures that if an autoscroll starts from within a " +
+ "scrollable div in a non-scrollable iframe, it does not propagate to its " +
+ "document body.");
+
+ function finishTest() {
+ eventSender.mouseUp();
+ var iframe = document.getElementById('noScrolliframe');
+ var iframeDoc = iframe.contentDocument;
+
+ if (iframeDoc.scrollingElement.scrollTop == 0 && iframeDoc.scrollingElement.scrollLeft == 0) {
+ testPassed("Document didn't scroll.");
+ } else {
+ testFailed("Document scrolled although overflow:hidden.");
+ }
+ document.getElementById('noScrolliframe').style.display = 'none';
+ finishJSTest();
+ }
+
+ window.onload = function () {
+ var iframe = document.getElementById('noScrolliframe');
+ var iframeDoc = iframe.contentDocument;
+
+ var element = iframeDoc.getElementById('select');
+ var x = iframe.offsetLeft + element.offsetLeft + 7;
+ var y = iframe.offsetTop + element.offsetTop + 7;
+ eventSender.dragMode = false;
+ eventSender.mouseMoveTo(x, y);
+ eventSender.mouseDown();
+ eventSender.mouseMoveTo(x + 800, y);
+ eventSender.mouseMoveTo(x + 800, y + 500);
+ window.requestAnimationFrame(finishTest);
+ }
+</script>
+
+<iframe id="noScrolliframe" scrolling="no" src="resources/page-with-scrollable-div.html"></iframe>
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/events/autoscroll-upwards-propagation-no-scroll-iframe-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698