[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.22-985-g3c00f00
tonikitoo at webkit.org
tonikitoo at webkit.org
Wed Mar 17 18:20:20 UTC 2010
The following commit has been merged in the webkit-1.1 branch:
commit 06ea144ee9cfb5c7d7ddc1143d71f7e571cba92c
Author: tonikitoo at webkit.org <tonikitoo at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Fri Mar 5 15:46:29 2010 +0000
Extend keyboard navigation to allow directional navigation (LayoutTests - part I)
https://bugs.webkit.org/show_bug.cgi?id=18662
Reviewed by Kenneth Christiansen.
Patch by Antonio Gomes <tonikitoo at webkit.org>
This patch adds support for auto testing the Spatial Navigation feature by:
1) Creating the directory where the tests are going to live in, named
fast/events/spatial-navigation/.
2) Skipping this directory by Mac, Qt, Gtk and Win.
3) Adding a JS file drives the test execution by processing, for each test,
a given set of arrow key actions and verify if the right expected Element
got the focus after each event processed. This file is
fast/events/spatial-navigation/resources/spatial-navigation-utils.js
* LayoutTests/fast/events/spatial-navigation/snav-vertical-superprecedence.html: Added.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@55577 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 2ac7493..896089f 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,23 @@
+2010-03-02 Antonio Gomes <tonikitoo at webkit.org>
+
+ Reviewed by Kenneth Christiansen.
+ Patch by Antonio Gomes <tonikitoo at webkit.org>
+
+ Extend keyboard navigation to allow directional navigation (LayoutTests - part I)
+ https://bugs.webkit.org/show_bug.cgi?id=18662
+
+ This patch adds support for auto testing the spatial navigation feature by:
+
+ 1) Creating the directory where the tests are going to live in, named
+ fast/events/spatial-navigation/.
+ 2) Skipping this directory by Mac, Qt, Gtk and Win.
+ 3) Adding a JS file drives the test execution by processing, for each test,
+ a given set of arrow key actions and verify if the right expected Element
+ got the focus after each event processed. This file is
+ fast/events/spatial-navigation/resources/spatial-navigation-utils.js
+
+ * LayoutTests/fast/events/spatial-navigation/snav-vertical-superprecedence.html: Added.
+
2010-03-05 Dean Jackson <dino at apple.com>
Reviewed by Simon Fraser and Chris Marrin.
diff --git a/LayoutTests/fast/events/spatial-navigation/resources/spatial-navigation-utils.js b/LayoutTests/fast/events/spatial-navigation/resources/spatial-navigation-utils.js
new file mode 100644
index 0000000..2a44cc9
--- /dev/null
+++ b/LayoutTests/fast/events/spatial-navigation/resources/spatial-navigation-utils.js
@@ -0,0 +1,68 @@
+/*
+ * Original author: Doug Turner <doug.turner at gmail.com>
+ *
+ * Contributors:
+ * * Antonio Gomes <tonikitoo at webkit.org>
+ **/
+
+var gExpectedResults;
+var gIndex = 0;
+var gClosureCallback = null;
+
+function initTest(table, completedCb) {
+
+ gExpectedResults = table;
+ gIndex = 0;
+ gClosureCallback = completedCb;
+
+ prepareMove();
+}
+
+function prepareMove()
+{
+ // When a table has with "DONE", call the completion callback and end the moves.
+ if (gExpectedResults[gIndex][0] == "DONE")
+ if (gClosureCallback) {
+ gClosureCallback();
+ return;
+ }
+
+ // When a table has an "", just end the moves.
+ if (gExpectedResults[gIndex][0] == "")
+ return;
+
+ doMove();
+}
+
+function doMove()
+{
+ var event = document.createEvent('KeyboardEvents');
+ event.initKeyboardEvent('keydown', true, true, document.defaultView, gExpectedResults[gIndex][0], 0, false, false, false, false, false);
+ document.dispatchEvent(event);
+
+ setTimeout(verifyAndAdvance, 15);
+}
+
+function verifyAndAdvance()
+{
+ var direction = gExpectedResults[gIndex][0];
+ var expectedID = gExpectedResults[gIndex][1];
+
+ var i = 0;
+ var mainFrameHasFocus = true;
+ for(; i < window.frames.length; i++)
+ if (window.frames[i].document.hasFocus()) {
+ mainFrameHasFocus = false;
+ break;
+ }
+
+ // This support frames nested in one level deep only.
+ if (mainFrameHasFocus)
+ shouldBeEqualToString("document.activeElement.getAttribute(\"id\")", expectedID);
+ else
+ shouldBeEqualToString("document.defaultView.frames[" + i + "].document.activeElement.getAttribute(\"id\")", expectedID);
+
+ gIndex++;
+ prepareMove();
+}
+
diff --git a/LayoutTests/platform/gtk/Skipped b/LayoutTests/platform/gtk/Skipped
index 30f077f..6b0b67b 100644
--- a/LayoutTests/platform/gtk/Skipped
+++ b/LayoutTests/platform/gtk/Skipped
@@ -5803,3 +5803,6 @@ fast/dom/Geolocation/permission-denied-already-error.html
fast/dom/Geolocation/permission-denied-already-success.html
fast/dom/Geolocation/permission-denied-stops-watches.html
fast/dom/Geolocation/permission-denied.html
+
+# Need to add functionality to DumpRenderTree to handle enable/disable Spatial Navigation
+fast/events/spatial-navigation
diff --git a/LayoutTests/platform/mac/Skipped b/LayoutTests/platform/mac/Skipped
index c323f92..a781c5e 100644
--- a/LayoutTests/platform/mac/Skipped
+++ b/LayoutTests/platform/mac/Skipped
@@ -122,3 +122,6 @@ http/tests/misc/image-checks-for-accept.html
# Crashes in debug
# https://bugs.webkit.org/show_bug.cgi?id=35631
svg/custom/tiling-regular-hexagonal-crash.svg
+
+# Need to add functionality to DumpRenderTree to handle enable/disable Spatial Navigation
+fast/events/spatial-navigation
diff --git a/LayoutTests/platform/qt/Skipped b/LayoutTests/platform/qt/Skipped
index 0a7a2ff..1f40053 100644
--- a/LayoutTests/platform/qt/Skipped
+++ b/LayoutTests/platform/qt/Skipped
@@ -5095,3 +5095,6 @@ java
# see https://bugs.webkit.org/show_bug.cgi?id=33180.
# Core functionality is tested in plugins/private-browsing-mode-2.html
plugins/private-browsing-mode.html
+
+# Need to add functionality to DumpRenderTree to handle enable/disable Spatial Navigation
+fast/events/spatial-navigation
diff --git a/LayoutTests/platform/win/Skipped b/LayoutTests/platform/win/Skipped
index e40a16c..57c58db 100644
--- a/LayoutTests/platform/win/Skipped
+++ b/LayoutTests/platform/win/Skipped
@@ -774,3 +774,6 @@ fast/loader/api-test-new-window-data-load-base-url.html
# DumpRenderTree code to enable Java is currently a no-op. Windows doesn't come with Java by default.
java
+
+# Need to add functionality to DumpRenderTree to handle enable/disable Spatial Navigation
+fast/events/spatial-navigation
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list