Title: [185247] trunk/LayoutTests
Revision
185247
Author
bfulg...@apple.com
Date
2015-06-05 09:19:26 -0700 (Fri, 05 Jun 2015)

Log Message

Add WK1 versions of tests from Bugs 145637 and 145642
https://bugs.webkit.org/show_bug.cgi?id=145649

Reviewed by Zalan Bujtas.

* platform/mac/fast/scrolling/iframe_in_iframe-expected.txt: Added.
* platform/mac/fast/scrolling/iframe_in_iframe.html: Added.
* platform/mac/fast/scrolling/resources/inner_content.html: Added.
* platform/mac/fast/scrolling/resources/testContent.html: Added.
* platform/mac/fast/scrolling/resources/testImage.png: Added.

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (185246 => 185247)


--- trunk/LayoutTests/ChangeLog	2015-06-05 15:19:43 UTC (rev 185246)
+++ trunk/LayoutTests/ChangeLog	2015-06-05 16:19:26 UTC (rev 185247)
@@ -1,3 +1,16 @@
+2015-06-05  Brent Fulgham  <bfulg...@apple.com>
+
+        Add WK1 versions of tests from Bugs 145637 and 145642
+        https://bugs.webkit.org/show_bug.cgi?id=145649
+
+        Reviewed by Zalan Bujtas.
+
+        * platform/mac/fast/scrolling/iframe_in_iframe-expected.txt: Added.
+        * platform/mac/fast/scrolling/iframe_in_iframe.html: Added.
+        * platform/mac/fast/scrolling/resources/inner_content.html: Added.
+        * platform/mac/fast/scrolling/resources/testContent.html: Added.
+        * platform/mac/fast/scrolling/resources/testImage.png: Added.
+
 2015-06-05  Manuel Rego Casasnovas  <r...@igalia.com>
 
         [CSS Grid Layout] Support dots sequences in grid-template-areas

Added: trunk/LayoutTests/platform/mac/fast/scrolling/iframe_in_iframe-expected.txt (0 => 185247)


--- trunk/LayoutTests/platform/mac/fast/scrolling/iframe_in_iframe-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/platform/mac/fast/scrolling/iframe_in_iframe-expected.txt	2015-06-05 16:19:26 UTC (rev 185247)
@@ -0,0 +1,17 @@
+Inner Frame:
+
+Tests that iframe doesn't pass wheel events to main frame when scrolling inside iframe
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS successfullyParsed is true
+
+TEST COMPLETE
+PASS Page did not receive wheel events.
+PASS iframe did not receive wheel events.
+PASS iframe received wheel events.
+PASS successfullyParsed is true
+
+TEST COMPLETE
+

Added: trunk/LayoutTests/platform/mac/fast/scrolling/iframe_in_iframe.html (0 => 185247)


--- trunk/LayoutTests/platform/mac/fast/scrolling/iframe_in_iframe.html	                        (rev 0)
+++ trunk/LayoutTests/platform/mac/fast/scrolling/iframe_in_iframe.html	2015-06-05 16:19:26 UTC (rev 185247)
@@ -0,0 +1,114 @@
+<!DOCTYPE html>
+<html>
+    <head>
+        <title>iFrame in iFrame Test</title>
+        <style>
+        * {
+            box-sizing: border-box;
+        }
+
+        .container {
+            width:100%;
+            overflow:auto;
+            height:auto;
+        }
+
+        .innercontainer {
+            height:100%;
+            width:50%;
+        }
+        </style>
+        <script src=""
+    </head>
+    <body>
+<script>
+
+var iframeTarget;
+var innerIFrameTarget;
+var pageScrollPositionBefore;
+var iFrameScrollPositionBefore;
+var continueCount = 5;
+
+function checkForScroll()
+{
+    // The IFrame should not have scrolled at all.
+    var pageScrollPositionAfter = document.body.scrollTop;
+    var iFrameScrollPositionAfter = window.frames['target'].document.body.scrollTop;
+    var innerIFrameScrollPositionAfter = iframeTarget.contentWindow.frames['target'].document.body.scrollTop;
+
+    if (pageScrollPositionBefore != pageScrollPositionAfter)
+        testFailed("Page received wheel events.");
+    else
+        testPassed("Page did not receive wheel events.");
+
+    if (iFrameScrollPositionBefore != iFrameScrollPositionAfter)
+        testFailed("iframe received wheel events.");
+    else
+        testPassed("iframe did not receive wheel events.");
+
+    if (innerIFrameScrollPositionBefore != innerIFrameScrollPositionAfter)
+        testPassed("iframe received wheel events.");
+    else
+        testFailed("iframe did not receive wheel events.");
+
+    finishJSTest();
+    testRunner.notifyDone();
+}
+
+function scrollTest()
+{
+    pageScrollPositionBefore = document.body.scrollTop;
+
+    iframeTarget = document.getElementById('target');
+
+    var iFrameBody = window.frames['target'].document.body;
+    iFrameScrollPositionBefore = iFrameBody.scrollTop;
+
+    innerIFrameTarget = iframeTarget.contentWindow.frames['target'].document.body;
+    innerIFrameScrollPositionBefore = innerIFrameTarget.scrollTop;
+
+    // Scroll the #source until we reach the #target.
+    var startPosX = Math.round(iframeTarget.offsetLeft) + 20;
+    var startPosY = Math.round(iframeTarget.offsetTop) + 80;
+    eventSender.mouseMoveTo(startPosX, startPosY);
+    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'began', 'none');
+    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none');
+    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none');
+    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'ended', 'none');
+    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'begin');
+    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
+    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
+    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
+    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
+    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'none', 'end');
+    eventSender.callAfterScrollingCompletes(checkForScroll);
+}
+
+function setupTopLevel()
+{
+    if (window.eventSender) {
+        testRunner.dumpAsText();
+        testRunner.waitUntilDone();
+
+        eventSender.monitorWheelEvents();
+        setTimeout(scrollTest, 0);
+    }
+}
+</script>
+        <div class="container">
+            <div class="innercontainer">
+                <div style="width:100%;">
+                    <div>Inner Frame:</div>
+                    <div style="height:92%;">
+                        <iframe id="target" name="target" src="" _onload_="setupTopLevel();"></iframe>
+                    </div>
+                </div>
+            </div>
+        </div>
+        <div id="console"></div>
+        <script>
+        description("Tests that iframe doesn't pass wheel events to main frame when scrolling inside iframe");
+        </script>
+        <script src=""
+    </body>
+</html>
\ No newline at end of file

Added: trunk/LayoutTests/platform/mac/fast/scrolling/resources/inner_content.html (0 => 185247)


--- trunk/LayoutTests/platform/mac/fast/scrolling/resources/inner_content.html	                        (rev 0)
+++ trunk/LayoutTests/platform/mac/fast/scrolling/resources/inner_content.html	2015-06-05 16:19:26 UTC (rev 185247)
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<html lang="en-US">
+    <head>
+        <title>Inner iFrame Example</title>
+        <meta charset="utf-8">
+    </head>
+    <body style="position: relative; min-height: 100%; top: 0px;">
+        <div style="overflow:auto;">
+            <img src=""
+            <div>TEST CASE TEST CASE TEST CASE TEST CASE</div>
+        </div>
+        <div style="overflow:auto;">
+            <h1>TEST HEADING</h1>
+            <p>Test paragraph.</p>
+            <div>TEST BUTTON 1</div>
+            <div>TEST BUTTON 2</div>      
+        </div>
+    </body>
+</html>
\ No newline at end of file

Added: trunk/LayoutTests/platform/mac/fast/scrolling/resources/testContent.html (0 => 185247)


--- trunk/LayoutTests/platform/mac/fast/scrolling/resources/testContent.html	                        (rev 0)
+++ trunk/LayoutTests/platform/mac/fast/scrolling/resources/testContent.html	2015-06-05 16:19:26 UTC (rev 185247)
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<html>
+<body>
+
+<p>An iframe where scrollbars are always shown:</p>
+<iframe id="target" name="target" src="" width="200" height="200" scrolling="yes">
+  <p>Your browser does not support iframes.</p>
+</iframe>
+
+<p>An iframe where scrollbars are never shown:</p>
+<iframe src="" width="200" height="200" scrolling="no">
+  <p>Your browser does not support iframes.</p>
+</iframe>
+
+<p>The scrolling attribute is not supported in HTML5. Use CSS instead.</p>
+
+</body>
+</html>
\ No newline at end of file

Added: trunk/LayoutTests/platform/mac/fast/scrolling/resources/testImage.png


(Binary files differ)
Property changes on: trunk/LayoutTests/platform/mac/fast/scrolling/resources/testImage.png ___________________________________________________________________

Added: svn:mime-type

_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to