[SCM] WebKit Debian packaging branch, debian/experimental, updated. debian/1.3.8-1-1049-g2e11a8e

tonikitoo at webkit.org tonikitoo at webkit.org
Fri Jan 21 15:11:16 UTC 2011


The following commit has been merged in the debian/experimental branch:
commit 52560209315e2f8080b2aaeb43dc41ca52fd6dd2
Author: tonikitoo at webkit.org <tonikitoo at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Sat Jan 8 16:49:36 2011 +0000

    2011-01-07  Antonio Gomes  <agomes at rim.com>
    
            Reviewed by Kenneth Rohde Christiansen.
    
            [Qt] Spatial Navigation: adding a test for when scrollbars are turned off via WebKit API
            https://bugs.webkit.org/show_bug.cgi?id=51396
    
            Add a layout test to ensure that page is scrollable when spatial
            navgation is enabled even when scrollbars were disabled via WebKit
            API (e.g. QWebFrame::setScrollBarPolicy).
    
            Test is Qt-only for now since Qt's DRT is the only one that supports
            LayoutTestController::setScrollbarPolicy.
    
            In real world QtWebKit apps, scrollbars are disabled usually prior to
            any page load. To emulate that on a layout test, it was added two html
            files: one that set scrollbars off and queues the load of the real
            test, and other that does the real testing.
    
            * platform/qt/fast/spatial-navigation/resources/ensure-scrolls-with-scrollbars-disabled-by-webkit.html: Added.
            * platform/qt/fast/spatial-navigation/snav-ensure-scrolls-with-scrollbars-disabled-by-webkit-expected.txt: Added.
            * platform/qt/fast/spatial-navigation/snav-ensure-scrolls-with-scrollbars-disabled-by-webkit.html: Added.
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@75321 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index f34bfd6..826b6fc 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,26 @@
+2011-01-07  Antonio Gomes  <agomes at rim.com>
+
+        Reviewed by Kenneth Rohde Christiansen.
+
+        [Qt] Spatial Navigation: adding a test for when scrollbars are turned off via WebKit API
+        https://bugs.webkit.org/show_bug.cgi?id=51396
+
+        Add a layout test to ensure that page is scrollable when spatial
+        navgation is enabled even when scrollbars were disabled via WebKit
+        API (e.g. QWebFrame::setScrollBarPolicy).
+
+        Test is Qt-only for now since Qt's DRT is the only one that supports
+        LayoutTestController::setScrollbarPolicy.
+
+        In real world QtWebKit apps, scrollbars are disabled usually prior to
+        any page load. To emulate that on a layout test, it was added two html
+        files: one that set scrollbars off and queues the load of the real
+        test, and other that does the real testing.
+
+        * platform/qt/fast/spatial-navigation/resources/ensure-scrolls-with-scrollbars-disabled-by-webkit.html: Added.
+        * platform/qt/fast/spatial-navigation/snav-ensure-scrolls-with-scrollbars-disabled-by-webkit-expected.txt: Added.
+        * platform/qt/fast/spatial-navigation/snav-ensure-scrolls-with-scrollbars-disabled-by-webkit.html: Added.
+
 2011-01-07  Nico Weber  <thakis at chromium.org>
 
         Unreviewed, test expectations.
diff --git a/LayoutTests/platform/qt/fast/spatial-navigation/resources/ensure-scrolls-with-scrollbars-disabled-by-webkit.html b/LayoutTests/platform/qt/fast/spatial-navigation/resources/ensure-scrolls-with-scrollbars-disabled-by-webkit.html
new file mode 100644
index 0000000..ff3905a
--- /dev/null
+++ b/LayoutTests/platform/qt/fast/spatial-navigation/resources/ensure-scrolls-with-scrollbars-disabled-by-webkit.html
@@ -0,0 +1,49 @@
+<html>
+  <head>
+    <script src="../../../../../fast/js/resources/js-test-pre.js"></script>
+    <script src="../../../../../fast/spatial-navigation/resources/spatial-navigation-utils.js"></script>
+    <script type="application/javascript">
+
+    var resultMap = [
+      ["Down", "start"],
+      ["DONE", "DONE"]
+    ];
+
+    if (window.layoutTestController) {
+      layoutTestController.dumpAsText();
+      layoutTestController.setSpatialNavigationEnabled(true);
+      layoutTestController.overridePreference("WebKitTabToLinksPreferenceKey", 1);
+      layoutTestController.waitUntilDone();
+    }
+
+    function runTest()
+    {
+      // starting the test itself: get to a known place.
+      document.getElementById("start").focus();
+
+      shouldBeTrue(String(document.body.scrollTop == 0));
+
+      initTest(resultMap, testCompleted);
+    }
+
+    function testCompleted()
+    {
+      shouldBeTrue(String(document.body.scrollTop != 0));
+
+      if (window.layoutTestController)
+        layoutTestController.notifyDone();
+    }
+
+    window.onload = runTest;
+
+    </script>
+    <script src="js/resources/js-test-post.js"></script>
+  </head>
+  <body id="some-content" xmlns="http://www.w3.org/1999/xhtml">
+    <a id="start" href="a">Start</a>
+    <div style='margin-top:5000px'>
+        <a id="end" href="a">End</a>
+    </div>
+    <div id="console"></div>
+  </body>
+</html>
diff --git a/LayoutTests/platform/qt/fast/spatial-navigation/snav-ensure-scrolls-with-scrollbars-disabled-by-webkit-expected.txt b/LayoutTests/platform/qt/fast/spatial-navigation/snav-ensure-scrolls-with-scrollbars-disabled-by-webkit-expected.txt
new file mode 100644
index 0000000..1e082b5
--- /dev/null
+++ b/LayoutTests/platform/qt/fast/spatial-navigation/snav-ensure-scrolls-with-scrollbars-disabled-by-webkit-expected.txt
@@ -0,0 +1,6 @@
+Start
+End
+PASS true is true
+PASS gFocusedDocument.activeElement.getAttribute("id") is "start"
+PASS true is true
+
diff --git a/LayoutTests/platform/qt/fast/spatial-navigation/snav-ensure-scrolls-with-scrollbars-disabled-by-webkit.html b/LayoutTests/platform/qt/fast/spatial-navigation/snav-ensure-scrolls-with-scrollbars-disabled-by-webkit.html
new file mode 100644
index 0000000..49ee978
--- /dev/null
+++ b/LayoutTests/platform/qt/fast/spatial-navigation/snav-ensure-scrolls-with-scrollbars-disabled-by-webkit.html
@@ -0,0 +1,36 @@
+<html>
+  <!--
+    This test ensures the correctness the following Spatial Navigation
+    algorithm features.
+
+    1) When scrollbars are disabled via WebKit API, spatial navigation is still
+       to scroll the page towards the closest element.
+
+    * Pre-conditions:
+    1) DRT support for SNav enable/disable.
+    2) Scrollbar creations are disable by an WebKit-like API.
+
+    * Navigation steps:
+    1) Loads this page, focus goes to "start" automatically.
+    2) Attempt to move focus down to "end". As it is far enough to be outside
+       the viewport, a scroll action has to be performed towards "end" direction
+       (i.e. scroll down).
+   -->
+  <head>
+    <script type="application/javascript">
+      if (window.layoutTestController) {
+        layoutTestController.setScrollbarPolicy('vertical', 'off');
+        layoutTestController.setScrollbarPolicy('horizontal', 'off');
+      }
+
+      function queueit()
+      {
+        layoutTestController.queueLoad("./resources/ensure-scrolls-with-scrollbars-disabled-by-webkit.html");
+      }
+
+      window.onload = queueit;
+    </script>
+  </head>
+  <body id="some-content" xmlns="http://www.w3.org/1999/xhtml">
+  </body>
+</html>

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list