[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-10851-g50815da

tonikitoo at webkit.org tonikitoo at webkit.org
Wed Dec 22 17:46:38 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 20fcff6bf18009d5a114f6e5471dcc08845e504f
Author: tonikitoo at webkit.org <tonikitoo at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Tue Nov 30 05:09:02 2010 +0000

    2010-11-28  Antonio Gomes  <agomes at rim.com>
    
            Reviewed by Kenneth Rohde Christiansen.
    
            Spatial navigation: move tests to its own feature directory
            https://bugs.webkit.org/show_bug.cgi?id=50133
    
            Patch basically moves all spatial navigation tests out of the fast/events folder,
            putting them all under /fast/spatial-navigation.
    
            Some needed changes in some tests and Skipped files were also made, but there is not
            any content changes in the tests.
    
            * fast/events/spatial-navigation: Moved to fast/spatial-navigation
            * platform/mac-wk2/Skipped:
            * platform/qt-wk2/Skipped:
            * platform/win/Skipped:
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@72880 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 5e91d49..b1019e7 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,21 @@
+2010-11-28  Antonio Gomes  <agomes at rim.com>
+
+        Reviewed by Kenneth Rohde Christiansen.
+
+        Spatial navigation: move tests to its own feature directory
+        https://bugs.webkit.org/show_bug.cgi?id=50133
+
+        Patch basically moves all spatial navigation tests out of the fast/events folder,
+        putting them all under /fast/spatial-navigation.
+
+        Some needed changes in some tests and Skipped files were also made, but there is not
+        any content changes in the tests.
+
+        * fast/events/spatial-navigation: Moved to fast/spatial-navigation
+        * platform/mac-wk2/Skipped:
+        * platform/qt-wk2/Skipped:
+        * platform/win/Skipped:
+
 2010-11-29  Ojan Vafai  <ojan at chromium.org>
 
         [chromium] Rebaseline results after http://trac.webkit.org/changeset/72802/.
diff --git a/LayoutTests/fast/events/spatial-navigation/snav-1st-stop.html b/LayoutTests/fast/events/spatial-navigation/snav-1st-stop.html
deleted file mode 100644
index 98f2657..0000000
--- a/LayoutTests/fast/events/spatial-navigation/snav-1st-stop.html
+++ /dev/null
@@ -1,68 +0,0 @@
-<html>
-  <!--
-    This test ensures the correctness of Spatial Navigation (SNav) algorithm from a non-focus scenario.
-
-    * Pre-conditions:
-    1) DRT support for SNav enable/disable.
-
-    * Navigation steps:
-    1) Loads this page and send key down.
-    2) The 1st link should be focused.
-  -->
-  <head>
-    <script src="../../js/resources/js-test-pre.js"></script>
-    <script src="resources/spatial-navigation-utils.js"></script>
-    <script type="application/javascript">
-
-    var resultMap = [
-      ["Down", "1"],
-      ["DONE", "DONE"]
-    ];
-
-    if (window.layoutTestController) {
-      layoutTestController.dumpAsText();
-      layoutTestController.setSpatialNavigationEnabled(true);
-      layoutTestController.overridePreference("WebKitTabToLinksPreferenceKey", 1);
-      layoutTestController.waitUntilDone();
-    }
-
-    function runTest()
-    {
-      // starting the test from no focused node.
-      initTest(resultMap, testCompleted);
-    }
-
-    function testCompleted()
-    {
-      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">
-    <table style="text-align: left; width: 100%; margin-left: auto; margin-right: auto;" border="1" cellpadding="2" cellspacing="1">
-      <tbody>
-        <tr>
-          <td style="vertical-align: top; text-align: center;"><a id="1" href="a">1</a></td>
-          <td style="vertical-align: top; text-align: center;"><a id="2" href="a">2</a></td>
-          <td style="vertical-align: top; text-align: center;"><a id="3" href="a">3</a></td>
-        </tr>
-        <tr>
-          <td style="vertical-align: top; text-align: center;"><a id="4" href="a">4</a></td>
-          <td style="vertical-align: top; text-align: center;"><a id="5" href="a">5</td>
-          <td style="vertical-align: top; text-align: center;"><a id="6" href="a">6</a></td>
-        </tr>
-        <tr>
-          <td style="vertical-align: top; text-align: center;"><a id="7" href="a">7</a></td>
-          <td style="vertical-align: top; text-align: center;"><a id="8" href="a">8</a></td>
-          <td style="vertical-align: top; text-align: center;"><a id="9" href="a">9</a></td>
-        </tr>
-      </tbody>
-    </table>
-    <div id="console"></div>
-  </body>
-</html>
diff --git a/LayoutTests/fast/events/spatial-navigation/snav-clipped-overflowed-content.html b/LayoutTests/fast/events/spatial-navigation/snav-clipped-overflowed-content.html
deleted file mode 100644
index e8b7cca..0000000
--- a/LayoutTests/fast/events/spatial-navigation/snav-clipped-overflowed-content.html
+++ /dev/null
@@ -1,92 +0,0 @@
-<html>
-  <!--
-    This test ensures the correctness of a basic aspect of spatial navigation traversal
-    routines: focusable elements in scrollable containers (e.g. <div>) should be
-    accessible, including offscreen content.
-
-    * Pre-conditions:
-    1) DRT support for spatial navivation enable/disable.
-
-    * Navigation steps:
-    1) Loads this page, focus goes to "start" automatically.
-    2) Move focus down to the visible focusable element in
-       scrollable div.
-    3) Traverse the page through other focusable elements down the page.
-       and then back up.
-
-    * Expected results: All focusable element in scrollable content, including
-    offscreen ones, should be accessible via spatial navigation. -->
-  <head>
-    <style type="text/css">
-      div.scroll {
-        height: 200px;
-        width: 300px;
-        overflow: auto;
-        border: 1px solid #666;
-        background-color: #ccc;
-        padding: 8px;
-      }
-    </style>
-
-    <script src="../../js/resources/js-test-pre.js"></script>
-    <script src="resources/spatial-navigation-utils.js"></script>
-    <script type="application/javascript">
-
-    var resultMap = [
-      ["Down", "1"],
-      ["Down", "1"],
-      ["Down", "2"],
-      ["Down", "2"],
-      ["Down", "2"],
-      ["Down", "3"],
-      ["Up", "2"],
-      ["Up", "2"],
-      ["Up", "2"],
-      ["Up", "1"],
-      ["Up", "1"],
-      ["Up", "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();
-
-      initTest(resultMap, testCompleted);
-    }
-
-    function testCompleted()
-    {
-      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"><img src="resources/green.png" width=30px height=30px></a>
-    <div class="scroll">
-      <a id="1" href="a"><img src="resources/green.png" width=30px height=30px></a>
-      <div></div>
-      <img src="resources/green.png" width=200px height=200px>
-      <div></div>
-      <a id="2" href="a"><img src="resources/green.png" width=30px height=30px></a>.</p>
-    </div>
-    <a id="3" href="a"><img src="resources/green.png" width=30px height=30px></a>
-    <div id="console"></div>
-    <div>This test tests that a div with css overflow:auto will scroll to reveal its focusable elements</div>
-  </body>
-</html>
-
diff --git a/LayoutTests/fast/events/spatial-navigation/snav-container-only-white-space.html b/LayoutTests/fast/events/spatial-navigation/snav-container-only-white-space.html
deleted file mode 100644
index f598e89..0000000
--- a/LayoutTests/fast/events/spatial-navigation/snav-container-only-white-space.html
+++ /dev/null
@@ -1,74 +0,0 @@
-<html>
-  <!--
-    This test ensures the correctness of a basic aspect of spatial navigation traversal
-    routines: focusable elements in scrollable containers (e.g. <div>) should be
-    accessible, including offscreen content.
-
-    * Pre-conditions:
-    1) DRT support for spatial navivation enable/disable.
-
-    * Navigation steps:
-    1) Loads this page, focus goes to "start" automatically.
-    2) Move focus down to the visible focusable element in
-       scrollable div.
-    3) Traverse the page through other focusable elements down the page.
-       and then back up.
-
-    * Expected results: All focusable element in scrollable content, including
-    offscreen ones, should be accessible via spatial navigation. -->
-  <head>
-    <style>
-    :focus {outline: 1px solid black;}
-    </style>
-    <script src="../../js/resources/js-test-pre.js"></script>
-    <script src="resources/spatial-navigation-utils.js"></script>
-    <script type="application/javascript">
-
-    var resultMap = [
-      ["Down", "2"],
-      ["Up", "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();
-
-      initTest(resultMap, testCompleted);
-    }
-
-    function testCompleted()
-    {
-      if (window.layoutTestController)
-        layoutTestController.notifyDone();
-    }
-
-    window.onload = runTest;
-
-    </script>
-    <script src="../js/resources/js-test-post.js"></script>
-  </head>
-  <body>
-    <a href="#" id="start">This is an element</a><br>
-
-    <div>
-      <a href="#" id="1">
-      </a>
-    </div>
-
-    <div>
-      <a href="#" id="2">This is an element</a><br>
-    </div>
-    <div id="console"></div>
-    <div>This test tests that a anchor element with only white spaces gives the correct size in ContainerNode::getRect().</div>
-  </body>
-</html>
-
diff --git a/LayoutTests/fast/events/spatial-navigation/snav-container-white-space.html b/LayoutTests/fast/events/spatial-navigation/snav-container-white-space.html
deleted file mode 100644
index 1f7d291..0000000
--- a/LayoutTests/fast/events/spatial-navigation/snav-container-white-space.html
+++ /dev/null
@@ -1,91 +0,0 @@
-<html>
-  <!--
-    This test ensures the correctness of a basic aspect of spatial navigation traversal
-    routines: focusable elements in scrollable containers (e.g. <div>) should be
-    accessible, including offscreen content.
-
-    * Pre-conditions:
-    1) DRT support for spatial navivation enable/disable.
-
-    * Navigation steps:
-    1) Loads this page, focus goes to "start" automatically.
-    2) Move focus down to the visible focusable element in
-       scrollable div.
-    3) Traverse the page through other focusable elements down the page.
-       and then back up.
-
-    * Expected results: All focusable element in scrollable content, including
-    offscreen ones, should be accessible via spatial navigation. -->
-  <head>
-    <style>
-    :focus {outline: 1px solid black;}
-    </style>
-    <script src="../../js/resources/js-test-pre.js"></script>
-    <script src="resources/spatial-navigation-utils.js"></script>
-    <script type="application/javascript">
-
-    var resultMap = [
-      ["Down", "1"],
-      ["Down", "2"],
-      ["Down", "3"],
-      ["Down", "4"],
-      ["Down", "5"],
-      ["Up", "4"],
-      ["Up", "3"],
-      ["Up", "2"],
-      ["Up", "1"],
-      ["Up", "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();
-
-      initTest(resultMap, testCompleted);
-    }
-
-    function testCompleted()
-    {
-      if (window.layoutTestController)
-        layoutTestController.notifyDone();
-    }
-
-    window.onload = runTest;
-
-    </script>
-    <script src="../js/resources/js-test-post.js"></script>
-  </head>
-  <body>
-    <a href="#" id="start">This is an element</a><br>
-
-    <div>
-      <a href="#" id="1">
-        <img src="resources/green.png" height="42" width="76"  border="0"/>
-      </a>
-    </div>
-
-    <div>
-      <a href="#" id="2">This is an element</a><br>
-    </div>
-
-    <a href="#" id="3">This is an element</a><br>
-
-    <a href="#" id="4">
-      <img src="resources/green.png" height="42" width="76" alt="llinker1" border="0"/>
-    </a><br>
-
-    <a href="#" id="5">This is an element</a><br>
-    <div id="console"></div>
-    <div>This test tests that a anchor element with in image in it and a space after the image, can still give the correct size in ContainerNode::getRect().</div>
-  </body>
-</html>
-
diff --git a/LayoutTests/fast/events/spatial-navigation/snav-div-overflow-scrol-hidden.html b/LayoutTests/fast/events/spatial-navigation/snav-div-overflow-scrol-hidden.html
deleted file mode 100644
index 24132ea..0000000
--- a/LayoutTests/fast/events/spatial-navigation/snav-div-overflow-scrol-hidden.html
+++ /dev/null
@@ -1,70 +0,0 @@
-<html>
-<head>
-    <script src="../../js/resources/js-test-pre.js"></script>
-    <script src="resources/spatial-navigation-utils.js"></script>
-    <script type="application/javascript">
-
-    var resultMap = [
-      ["Down", "f2"],
-      ["Down", "f3"],
-      ["Down", "f3"],
-      ["Down", "f4"],
-      ["Down", "f4"],
-      ["Down", "f5"],
-      ["Down", "f6"],
-      ["Down", "f9"],
-      ["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();
-
-      initTest(resultMap, testCompleted);
-    }
-
-    function testCompleted()
-    {
-      if (window.layoutTestController)
-        layoutTestController.notifyDone();
-    }
-
-    window.onload = runTest;
-    </script>
-    <script src="../js/resources/js-test-post.js"></script>
-    <style>
-    div.overflow1 {overflow:auto; height:100px; width:200px; border: 1px solid cyan;}
-    div.overflow2 {overflow:hidden; height:80px; width:150px; border: 1px solid cyan;}
-    div:focus { outline: 2px solid red;}
-    </style>
-</head>
-
-<body>
-<div class="overflow1">
-<div><a href="#" id="start"><img src="resources/green.png" width=40px; height=40px;></a></div>
-<div><a href="#" id="f2"><img src="resources/green.png" width=50px; height=40px;></a></div>
-<div><a href="#" id="f3"><img src="resources/green.png" width=40px; height=40px;></a></div>
-<br>
-<div><a href="#" id="f4"><img src="resources/green.png" width=50px; height=40px;></a></div>
-<div class="overflow2">
-<div><a href="#" id="f5"><img src="resources/green.png" width=40px; height=40px;></a></div>
-<div><a href="#" id="f6"><img src="resources/green.png" width=50px; height=40px;></a></div>
-<br>
-<div><a href="#" id="f7"><img src="resources/green.png" width=40px; height=40px;></a></div>
-<div><a href="#" id="f8"><img src="resources/green.png" width=50px; height=40px;></a></div>
-</div><br>
-<div><a href="#" id="f9"><img src="resources/green.png" width=40px; height=40px;></a></div>
-</div></div>
-<div id="console"></div>
-This test is testing that div with overflow:auto would scroll, by div with overflow:hidden would not.
-</body>
-</html>
-
diff --git a/LayoutTests/fast/events/spatial-navigation/snav-div-scrollable-but-without-focusable-content.html b/LayoutTests/fast/events/spatial-navigation/snav-div-scrollable-but-without-focusable-content.html
deleted file mode 100644
index 8a40c83..0000000
--- a/LayoutTests/fast/events/spatial-navigation/snav-div-scrollable-but-without-focusable-content.html
+++ /dev/null
@@ -1,86 +0,0 @@
-<html>
-  <!--
-    This test ensures the correctness of a basic aspect of spatial navigation traversal
-    routines: scrollable block html elements without any focusable content should be ignored.
-
-    * Pre-conditions:
-    1) DRT support for spatial navigation enable/disable.
-
-    * Navigation steps:
-    1) Loads this page, focus goes to "start" automatically.
-    2) Focus moves from "start" to "end" bypassing the two div's
-       in between them, once both have no focusable elements inside.
-  -->
-  <head>
-    <style type="text/css">
-      div.scroll {
-        height: 200px;
-        width: 300px;
-        overflow: auto;
-        border: 1px solid #666;
-        background-color: #ccc;
-        padding: 8px;
-      }
-    </style>
-
-    <script src="../../js/resources/js-test-pre.js"></script>
-    <script src="resources/spatial-navigation-utils.js"></script>
-    <script type="application/javascript">
-
-    var resultMap = [
-      ["Down", "start"],
-      ["Down", "start"],
-      ["Down", "start"],
-      ["Down", "start"],
-      ["Down", "start"],
-      ["Down", "start"],
-      ["Down", "end"],
-      ["Up"  , "end"],
-      ["Up"  , "end"],
-      ["Up"  , "end"],
-      ["Up"  , "end"],
-      ["Up"  , "end"],
-      ["Up"  , "end"],
-      ["Up"  , "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();
-
-      initTest(resultMap, testCompleted);
-    }
-
-    function testCompleted()
-    {
-      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">
-    <div><a id="start" href="a"><img src="resources/green.png" width=30 height=30></a></div>
-    <div class="scroll">
-      <img src="resources/green.png" width=240 height=300>
-    </div>
-
-    <div class="scroll">
-      <img src="resources/green.png" width=240 height=300>
-    </div>
-    <div><a id="end" href="a"><img src="resources/green.png" width=30 height=30></a></div>
-    <div id="console"></div>
-    This test is to test that a scrollable div can scroll and reveal its content even if it does not have any focusable content.
-  </body>
-</html>
diff --git a/LayoutTests/fast/events/spatial-navigation/snav-fully-aligned-horizontally.html b/LayoutTests/fast/events/spatial-navigation/snav-fully-aligned-horizontally.html
deleted file mode 100644
index 9318dae..0000000
--- a/LayoutTests/fast/events/spatial-navigation/snav-fully-aligned-horizontally.html
+++ /dev/null
@@ -1,99 +0,0 @@
-<html>
-  <!--
-    This test ensures the correctness of the "Fully aligned" precedence
-    logic implemented by Spatial Navigation algorithm in an horizontal direction:
-    targets whose middle falls between the top and bottom of the current focused
-    element are preferably to move focus to, even if it is not the shortest distance.
-
-    * Pre-conditions:
-    1) DRT support for SNav enable/disable.
-
-    * Navigation steps:
-    1) Loads this page, focus goes to "start" automatically.
-    2) Focus moves preferably to elements right up or above the
-       current focused element, even when there are some other closer
-       but not vertically aligned elements in the same direction.
-  -->
-  <head>
-    <script src="../../js/resources/js-test-pre.js"></script>
-    <script src="resources/spatial-navigation-utils.js"></script>
-    <script type="application/javascript">
-
-    var resultMap = [
-      ["Down", "1"],
-      ["Right", "2"],
-      ["Down", "4"],
-      ["Left", "3"],
-      ["Down", "5"],
-      ["Right", "6"],
-      ["Down", "8"],
-      ["Left", "7"],
-      ["Down", "9"],
-      ["Right", "10"],
-      ["Down", "12"],
-      ["Left", "11"],
-      ["Down", "13"],
-      ["Right", "14"],
-      ["Down", "16"],
-      ["Left", "15"],
-      ["Down", "17"],
-      ["Right", "18"],
-      ["Down", "20"],
-      ["Left", "19"],
-      ["Down", "21"],
-      ["Right", "22"],
-      ["Down", "24"],
-      ["Left", "23"],
-      ["Down", "25"],
-      ["Right", "26"],
-      ["Down", "27"],
-      ["Down", "end"],
-      ["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();
-
-      initTest(resultMap, testCompleted);
-    }
-
-    function testCompleted()
-    {
-      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">test<br></a>
-    <a id="1" href="a">H</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;<a id="2" href="p">ow Now Brown Cow</a><br>
-    <a id="3" href="a">Ho</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&nbsp;&nbsp; <a id="4" href="p">w Now Brown Cow</a><br>
-    <a id="5" href="a">How</a> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a id="6" href="p">Now Brown Cow</a><br>
-    <a id="7" href="a">How N</a> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <a id="8" href="p">ow Brown Cow</a><br>
-    <a id="9" href="a">How No</a> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <a id="10" href="p">w Brown Cow</a><br>
-    <a id="11" href="a">How Now </a>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <a id="12" href="p">Brown Cow</a><br>
-    <a id="13" href="a">How Now B</a> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <a id="14" href="p">rown Cow</a><br>
-    <a id="15" href="a">How Now Br</a> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <a id="16" href="p">own Cow</a><br>
-    <a id="17" href="a">How Now Bro</a> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <a id="18" href="p">wn Cow</a><br>
-    <a id="19" href="a">How Now Brow</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a id="20" href="p">n Cow</a><br>
-    <a id="21" href="a">How Now Brown</a> &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&nbsp; <a id="22" href="p">Cow</a><br>
-    <a id="23" href="a">How Now Brown C</a> &nbsp; &nbsp;&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <a id="24" href="p">ow</a><br>
-    <a id="25" href="a">How Now Brown Co</a> &nbsp;&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <a id="26" href="p">w</a><br>
-    <a id="27" href="a">How Now Brown Cow</a><br><br>
-    <a id="end" href="a">test<br></a>
-    <div id="console"></div>
-  </body>
-</html>
-
diff --git a/LayoutTests/fast/events/spatial-navigation/snav-fully-aligned-vertically.html b/LayoutTests/fast/events/spatial-navigation/snav-fully-aligned-vertically.html
deleted file mode 100644
index 00a5455..0000000
--- a/LayoutTests/fast/events/spatial-navigation/snav-fully-aligned-vertically.html
+++ /dev/null
@@ -1,82 +0,0 @@
-<html>
-  <!--
-    This test ensures the correctness of the "Fully aligned" precedence
-    logic implemented by Spatial Navigation algorithm in an vertical direction:
-    targets whose middle falls between the top and bottom of the current focused
-    element are preferably to move focus to, even if it is not the shortest distance.
-
-    * Pre-conditions:
-    1) DRT support for SNav enable/disable.
-
-    * Navigation steps:
-    1) Loads this page, focus goes to "start" automatically.
-    2) Focus moves preferably to elements right up or above the
-       current focused element, even when there are some other closer
-       but not vertically aligned elements in the same direction.
-  -->
-  <head>
-    <script src="../../js/resources/js-test-pre.js"></script>
-    <script src="resources/spatial-navigation-utils.js"></script>
-    <script type="application/javascript">
-
-    var resultMap = [
-      ["Down", "4"],
-      ["Down", "6"],
-      ["Down", "8"],
-      ["Down", "end"],
-      ["Up", "7"],
-      ["Up", "2"],
-      ["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();
-
-      initTest(resultMap, testCompleted);
-    }
-
-    function testCompleted()
-    {
-      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">
-    <div style="margin-left: 40px; text-align: left;">
-      <div style="margin-left: 40px;">
-        <a id="start" href="a">test<br></a>
-      </div>
-      <a id="2" href="a">test</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a id="3" href="a">test</a><br>
-      <div style="margin-left: 40px;">
-        <a id="4" href="a">test<br></a>
-      </div>
-      <div style="margin-left: 80px;">
-        <a id="5" href="a">test<br></a>
-      </div>
-      <div style="margin-left: 40px;">
-        <a id="6" href="a">test<br></a>
-      </div>
-      <a id="7" href="a">test<br></a>
-      <br><br><br><br>
-      <div style="margin-left: 40px;">
-        <a id="8" href="a">test<br></a>
-      </div>
-      <a id="end" href="a">test<br></a>
-    </div>
-    <div id="console"></div>
-  </body>
-</html>
-
diff --git a/LayoutTests/fast/events/spatial-navigation/snav-iframe-flattening-simple.html b/LayoutTests/fast/events/spatial-navigation/snav-iframe-flattening-simple.html
deleted file mode 100644
index 53fe41a..0000000
--- a/LayoutTests/fast/events/spatial-navigation/snav-iframe-flattening-simple.html
+++ /dev/null
@@ -1,74 +0,0 @@
-<html>
-  <!--
-    This test ensures the cross iframe traversal correctness of Spatial Navigation
-    algorithm: focusable elements in an flattened <iframe> should be accessible.
-
-    * Pre-conditions:
-    1) DRT support for Spatial Navigation enable/disable.
-    2) DRT support for Frame flattening enable/disable.
-
-    * Navigation steps:
-    1) Loads this page, focus goes to "start" automatically.
-    2) Focus moves along the elements in the two iframes in the
-       Web page, eventually going to outer an southward link, but
-       going back to the iframe on the top later on.
-  -->
-  <head>
-    <script src="../../js/resources/js-test-pre.js"></script>
-    <script src="resources/spatial-navigation-utils.js"></script>
-    <script type="application/javascript">
-
-    var resultMap = [
-      ["Down", "1"],
-      ["Down", "2"],
-      ["Down", "end"],
-      ["Up", "2"],
-      ["Up", "1"],
-      ["Up", "start"],
-      ["DONE", "DONE"]
-    ];
-
-    if (window.layoutTestController) {
-      layoutTestController.dumpAsText();
-      layoutTestController.setSpatialNavigationEnabled(true);
-      layoutTestController.overridePreference("WebKitTabToLinksPreferenceKey", 1);
-      layoutTestController.waitUntilDone();
-    }
-
-    function runTest()
-    {
-      if (window.layoutTestController)
-        layoutTestController.setFrameFlatteningEnabled(true);
-
-      // starting the test itself: get to a known place.
-      document.getElementById("start").focus();
-
-      initTest(resultMap, testCompleted);
-    }
-
-    function testCompleted()
-    {
-      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">
-    <div><a id="start" href="a">a</a></div>
-
-    <iframe width="80" height="80" scrolling="auto" src="data:text/html,
-      <body>
-        <a id='1' href='a'>b</a>
-        <div style='margin-top:120px'>
-          <a id='2' href='a'>d</a>
-        </div>
-      </body>
-    "></iframe><br>
-
-    <div><a id="end" href="a">e</a></div>
-    <div id="console"></div>
-  </body>
-</html>
diff --git a/LayoutTests/fast/events/spatial-navigation/snav-iframe-nested.html b/LayoutTests/fast/events/spatial-navigation/snav-iframe-nested.html
deleted file mode 100644
index 4143f74..0000000
--- a/LayoutTests/fast/events/spatial-navigation/snav-iframe-nested.html
+++ /dev/null
@@ -1,93 +0,0 @@
-<html>
-  <!--
-    This test ensures the cross iframe traversal correctness of spatial navigation:
-    focusable elements in nested inner frame should be accessible.
-
-    * Pre-conditions:
-    1) DRT support for spatial navigation enable/disable.
-
-    * Navigation steps:
-    1) Loads this page, focus goes to "start" automatically.
-    2) Focus moves along the elements in the two level deep nested frame,
-       but going back to the main frame later on.
-  -->
-  <head>
-    <script src="../../js/resources/js-test-pre.js"></script>
-    <script src="resources/spatial-navigation-utils.js"></script>
-    <script type="application/javascript">
-
-    var resultMap = [
-      ["Right", "1"],
-      ["Right", "2"],
-      ["Right", "3"],
-      ["Right", "4"],
-      ["Right", "5"],
-      ["Right", "6"],
-      ["Right", "7"],
-      ["Right", "8"],
-      ["Right", "9"],
-      ["Left", "8"],
-      ["Left", "7"],
-      ["Left", "6"],
-      ["Left", "5"],
-      ["Left", "4"],
-      ["Left", "3"],
-      ["Left", "2"],
-      ["Left", "1"],
-      ["Left", "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();
-
-      initTest(resultMap, testCompleted);
-    }
-
-    function testCompleted()
-    {
-      if (window.layoutTestController)
-        layoutTestController.notifyDone();
-    }
-
-    window.onload = runTest;
-    </script>
-    <script src="../js/resources/js-test-post.js"></script>
-  </head>
-  <body>
-  <table style="text-align: top;"  border="0" cellpadding="3px" cellspacing="3px">
-    <tr>
-      <td valign="top" width="10%">
-        <a id="start" href="#">Link</a><br>
-      </td>
-      <td valign="top">
-        <iframe width="50%" height="100px" frameborder="1" src="resources/iframe.html"></iframe><br>
-      </td>
-      <td valign="top" width="10%">
-        <a id="9" href="#">Link</a><br>
-      </td>
-    </tr>
-    <tr>
-      <td valign="top" width="10%">
-        <a id="10" href="#">Link</a><br>
-      </td>
-      <td valign="top">
-          <p><a id="11" href="#">Here</a> is a link.</p>
-      </td>
-      <td valign="top" width="10%">
-        <a id="12" href="#">Link</a><br>
-      </td>
-    </tr>
-  </table>
-  <div id="console"></div>
-  </body>
-</html>
diff --git a/LayoutTests/fast/events/spatial-navigation/snav-iframe-no-focusable-content.html b/LayoutTests/fast/events/spatial-navigation/snav-iframe-no-focusable-content.html
deleted file mode 100644
index 3f59fca..0000000
--- a/LayoutTests/fast/events/spatial-navigation/snav-iframe-no-focusable-content.html
+++ /dev/null
@@ -1,81 +0,0 @@
-<html>
-  <!--
-    This test ensures the basic traversal correctness of Spatial Navigation
-    algorithm: iframes without any focusable content should be ignored.
-
-    * Pre-conditions:
-    1) DRT support for SNav enable/disable.
-
-    * Navigation steps:
-    1) Loads this page, focus goes to "start" automatically.
-    2) Focus moves from "start" to "end" bypassing the two iframes
-       in between them, once both have no focusable elements inside.
-  -->
-  <head>
-    <script src="../../js/resources/js-test-pre.js"></script>
-    <script src="resources/spatial-navigation-utils.js"></script>
-    <script type="application/javascript">
-
-    var resultMap = [
-      ["Down", "start"],
-      ["Down", "start"],
-      ["Down", "start"],
-      ["Down", "start"],
-      ["Down", "start"],
-      ["Down", "start"],
-      ["Down", "end"],
-      ["Up"  , "end"],
-      ["Up"  , "end"],
-      ["Up"  , "end"],
-      ["Up"  , "end"],
-      ["Up"  , "end"],
-      ["Up"  , "end"],
-      ["Up"  , "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();
-
-      initTest(resultMap, testCompleted);
-    }
-
-    function testCompleted()
-    {
-      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">
-    <div><a id="start" href="a">a</a></div>
-
-    <iframe width="80" height="80" scrolling="auto" src="data:text/html,
-      <body>
-        <img width=120 height=200 src='resources/green.png'>
-      </body>
-    "></iframe><br>
-
-    <iframe scrolling="auto" src="data:text/html,
-      <body>
-        <img width=120 height=200 src='resources/green.png'>
-      </body>
-    "></iframe><br>
-
-    <a id="end" href="a">e</a>
-    <div id="console"></div>
-    This is to test that an iframe with no focusable content still scrolls
-  </body>
-</html>
diff --git a/LayoutTests/fast/events/spatial-navigation/snav-iframe-no-scrollable-content.html b/LayoutTests/fast/events/spatial-navigation/snav-iframe-no-scrollable-content.html
deleted file mode 100644
index 206039f..0000000
--- a/LayoutTests/fast/events/spatial-navigation/snav-iframe-no-scrollable-content.html
+++ /dev/null
@@ -1,88 +0,0 @@
-<html>
-  <!--
-    This test ensures the basic iframe traversal correctness of Spatial Navigation
-    algorithm: focusable elements in a <iframe> should be accessible.
-
-    * Pre-conditions:
-    1) DRT support for SNav enable/disable.
-
-    * Navigation steps:
-    1) Loads this page, focus goes to "start" automatically.
-    2) Focus moves along the elements in the two iframes in the
-       Web page, eventually going to outer an southward link, but
-       going back to the iframe on the top later on.
-  -->
-  <head>
-    <script src="../../js/resources/js-test-pre.js"></script>
-    <script src="resources/spatial-navigation-utils.js"></script>
-    <script type="application/javascript">
-
-    var resultMap = [
-      ["Down", "1"],
-      ["Down", "2"],
-      ["Down", "3"],
-      ["Down", "7"],
-      ["Down", "6"],
-      ["Down", "end"],
-      ["Up", "4"],
-      ["Right", "5"],
-      ["Right", "6"],
-      ["Up", "3"],
-      ["Right", "7"],
-      ["Up", "3"],
-      ["Up", "2"],
-      ["Up", "1"],
-      ["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();
-
-      initTest(resultMap, testCompleted);
-    }
-
-    function testCompleted()
-    {
-      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">
-    <div><a id="start" href="a">a</a></div>
-
-    <iframe src="data:text/html,
-      <body>
-        <a id='1' href='a'>b</a><br>
-        <a id='2' href='a'>c</a><br>
-        <a id='3' href='a'>d</a><br>
-        <div style='margin-left:80px'>
-          <a id='7' href='a'>e</a>
-        </div>
-      </body>
-    "></iframe><br>
-
-    <iframe src="data:text/html,
-      <body>
-        <a id='4' href='a'>g</a>
-        <a id='5' href='a'>h</a>
-        <a id='6' href='a'>i</a>
-      </body>
-    "></iframe><br>
-
-    <a id="end" href="a">a</a>
-    <div id="console"></div>
-  </body>
-</html>
diff --git a/LayoutTests/fast/events/spatial-navigation/snav-iframe-recursive-offset-parent.html b/LayoutTests/fast/events/spatial-navigation/snav-iframe-recursive-offset-parent.html
deleted file mode 100644
index 2ea4623..0000000
--- a/LayoutTests/fast/events/spatial-navigation/snav-iframe-recursive-offset-parent.html
+++ /dev/null
@@ -1,75 +0,0 @@
-<html>
-  <!--
-    This test ensures the cross iframe traversal correctness of Spatial Navigation
-    algorithm: focusable elements in an <iframe> should be accessible even when
-    the current focused element is in another <iframe> in the same page.
-
-    * Pre-conditions:
-    1) DRT support for SNav enable/disable.
-
-    * Navigation steps:
-    1) Loads this page, focus goes to "start" automatically.
-    2) Focus moves along the elements in the two iframes in the
-       Web page, eventually going to outer an southward link, but
-       going back to the iframe on the top later on.
-  -->
-  <head>
-    <script src="../../js/resources/js-test-pre.js"></script>
-    <script src="resources/spatial-navigation-utils.js"></script>
-    <script type="application/javascript">
-
-    var resultMap = [
-      ["Right", "1"],
-      ["Right", "2"],
-      ["Right", "3"],
-      ["Left", "2"],
-      ["Left", "1"],
-      ["Left", "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();
-
-      initTest(resultMap, testCompleted);
-    }
-
-    function testCompleted()
-    {
-      if (window.layoutTestController)
-        layoutTestController.notifyDone();
-    }
-
-    window.onload = runTest;
-    </script>
-    <script src="../js/resources/js-test-post.js"></script>
-  </head>
-  <body>
-  <table style="text-align: top;"  border="0" cellpadding="3px" cellspacing="3px">
-    <tr>
-      <td valign="top" width="10%">
-        <a id="start" href="http://google.com">Link</a><br>
-      </td>
-      <td valign="top">
-        <iframe width="50%" height="100px" frameborder="1" src="data:text/html,
-        <body>
-          <a id='1' href='http://a'>b</a>
-          <a id='2' href='http://a'>c</a>
-          <a id='3' href='http://a'>d</a>
-        </body>
-        "></iframe><br>
-      </td>
-    </tr>
-  </table>
-  <div id="console"></div>
-  </body>
-</html>
diff --git a/LayoutTests/fast/events/spatial-navigation/snav-iframe-with-offscreen-focusable-element.html b/LayoutTests/fast/events/spatial-navigation/snav-iframe-with-offscreen-focusable-element.html
deleted file mode 100644
index 8a54657..0000000
--- a/LayoutTests/fast/events/spatial-navigation/snav-iframe-with-offscreen-focusable-element.html
+++ /dev/null
@@ -1,84 +0,0 @@
-<html>
-  <!--
-    This test ensures the cross iframe traversal correctness of Spatial Navigation
-    algorithm: focusable elements in an <iframe> should be accessible even when
-    the current focused element is in another <iframe> in the same page.
-
-    * Pre-conditions:
-    1) DRT support for SNav enable/disable.
-
-    * Navigation steps:
-    1) Loads this page, focus goes to "start" automatically.
-    2) Focus moves along the elements in the two iframes in the
-       Web page, eventually going to outer an southward link, but
-       going back to the iframe on the top later on.
-  -->
-  <head>
-    <script src="../../js/resources/js-test-pre.js"></script>
-    <script src="resources/spatial-navigation-utils.js"></script>
-    <script type="application/javascript">
-
-    var resultMap = [
-      ["Down", "1"],
-      ["Down", "1"],
-      ["Down", "1"],
-      ["Down", "1"],
-      ["Down", "1"],
-      ["Down", "1"],
-      ["Down", "1"],
-      ["Down", "2"],
-      ["Down", "end"],
-      ["Up", "2"],
-      ["Up", "2"],
-      ["Up", "2"],
-      ["Up", "2"],
-      ["Up", "2"],
-      ["Up", "2"],
-      ["Up", "2"],
-      ["Up", "1"],
-      ["Up", "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();
-
-      initTest(resultMap, testCompleted);
-    }
-
-    function testCompleted()
-    {
-      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">
-    <div><a id="start" href="a"><img src="resources/green.png" width=30 height=30></a></div>
-
-    <iframe width="80" height="80" scrolling="auto" src="data:text/html,
-      <body>
-        <a id='1' href='a'><img src='no_image' width=30 height=30></a>
-        <div>
-          <img src='no_image' width=50 height=300>
-          <a id='2' href='a'><img src='no_image' width=30 height=30></a>
-        </div>
-      </body>
-    "></iframe><br>
-
-    <div><a id="end" href="a"><img src="resources/green.png" width=30 height=30></a></div>
-    <div id="console"></div>
-  </body>
-</html>
diff --git a/LayoutTests/fast/events/spatial-navigation/snav-input.html b/LayoutTests/fast/events/spatial-navigation/snav-input.html
deleted file mode 100644
index b07f9ea..0000000
--- a/LayoutTests/fast/events/spatial-navigation/snav-input.html
+++ /dev/null
@@ -1,78 +0,0 @@
-<!DOCTYPE html>
-  <head>
-    <script src="../../js/resources/js-test-pre.js"></script>
-    <script src="resources/spatial-navigation-utils.js"></script>
-    <script src="../js/resources/js-test-post.js"></script>
-  </head>
-  <body id="some-content" xmlns="http://www.w3.org/1999/xhtml">
-    <p id="description"></p>
-    <table style="text-align: left; width: 100%; margin-left: auto; margin-right: auto;" border="1" cellpadding="2" cellspacing="1">
-      <tbody>
-        <tr>
-          <td style="vertical-align: top; text-align: center;"></td>
-          <td style="vertical-align: top; text-align: center;"><a id="2" href="a">2</a></td>
-          <td style="vertical-align: top; text-align: center;"></td>
-        </tr>
-        <tr>
-          <td style="vertical-align: top; text-align: center;"><a id="4" href="a">4</a></td>
-          <td style="vertical-align: top; text-align: center;"><input id="start" type="text" value="text"></td>
-          <td style="vertical-align: top; text-align: center;"><a id="6" href="a">6</a></td>
-        </tr>
-        <tr>
-          <td style="vertical-align: top; text-align: center;"></td>
-          <td style="vertical-align: top; text-align: center;"><a id="8" href="a">8</a></td>
-          <td style="vertical-align: top; text-align: center;"></td>
-        </tr>
-      </tbody>
-    </table>
-    <div id="console"></div>
-    <script type="application/javascript">
-    description('This test ensures the correctness of Spatial Navigation (SNav) algorithm over input box.<br>\
-                * Pre-conditions:<br>\
-                1) DRT support for SNav enable/disable.<br>\
-                * Navigation steps:<br>\
-                1) Loads this page, focus goes to "start" automatically.<br>\
-                2) Focus moves away from input box in 4 different directions to neighbor nodes and back.<br>');
-
-    var resultMap = [
-      ["Down", "start"],
-      ["Down", "8"],
-      ["Up", "start"],
-      ["Up", "start"],
-      ["Up", "2"],
-      ["Down", "start"],
-      ["Right", "start"],
-      ["Right", "6"],
-      ["Left", "start"],
-      ["Left", "start"],
-      ["Left", "4"],
-      ["Right", "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();
-
-      initTest(resultMap, testCompleted);
-    }
-
-    function testCompleted()
-    {
-      if (window.layoutTestController)
-        layoutTestController.notifyDone();
-    }
-
-    window.onload = runTest;
-
-    </script>
-  </body>
-</html>
diff --git a/LayoutTests/fast/events/spatial-navigation/snav-multiple-select.html b/LayoutTests/fast/events/spatial-navigation/snav-multiple-select.html
deleted file mode 100644
index 700c2b6..0000000
--- a/LayoutTests/fast/events/spatial-navigation/snav-multiple-select.html
+++ /dev/null
@@ -1,83 +0,0 @@
-<html>
-  <!--
-    This test ensures the correctness of Spatial Navigation (SNav) algorithm over single select element.
-
-    * Pre-conditions:
-    1) DRT support for SNav enable/disable.
-
-    * Navigation steps:
-    1) Loads this page, focus goes to "start" automatically.
-    2) Focus moves away from select in 4 different directions to neighbor nodes and back.
-  -->
-  <head>
-    <script src="../../js/resources/js-test-pre.js"></script>
-    <script src="resources/spatial-navigation-utils.js"></script>
-    <script type="application/javascript">
-
-    var resultMap = [
-      ["Down", "start"],
-      ["Down", "start"],
-      ["Down", "start"],
-      ["Down", "8"],
-      ["Up", "start"],
-      ["Up", "start"],
-      ["Up", "start"],
-      ["Up", "2"],
-      ["Down", "start"],
-      ["Right", "6"],
-      ["Left", "start"],
-      ["Left", "4"],
-      ["Right", "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();
-
-      initTest(resultMap, testCompleted);
-    }
-
-    function testCompleted()
-    {
-      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">
-    <table style="text-align: left; width: 100%; margin-left: auto; margin-right: auto;" border="1" cellpadding="2" cellspacing="1">
-      <tbody>
-        <tr>
-          <td style="vertical-align: top; text-align: center;"></td>
-          <td style="vertical-align: top; text-align: center;"><a id="2" href="a">2</a></td>
-          <td style="vertical-align: top; text-align: center;"></td>
-        </tr>
-        <tr>
-          <td style="vertical-align: top; text-align: center;"><a id="4" href="a">4</a></td>
-          <td style="vertical-align: top; text-align: center;"><select id="start" multiple><option>1</option><option>2</option><option>3</option></select></td>
-          <td style="vertical-align: top; text-align: center;"><a id="6" href="a">6</a></td>
-        </tr>
-        <tr>
-          <td style="vertical-align: top; text-align: center;"></td>
-          <td style="vertical-align: top; text-align: center;"><a id="8" href="a">8</a></td>
-          <td style="vertical-align: top; text-align: center;"></td>
-        </tr>
-      </tbody>
-    </table>
-    <div id="console"></div>
-  </body>
-</html>
-
diff --git a/LayoutTests/fast/events/spatial-navigation/snav-offscreen-content.html b/LayoutTests/fast/events/spatial-navigation/snav-offscreen-content.html
deleted file mode 100644
index bf978dd..0000000
--- a/LayoutTests/fast/events/spatial-navigation/snav-offscreen-content.html
+++ /dev/null
@@ -1,74 +0,0 @@
-<html>
-  <!--
-    This test ensures the content overflow traversal correctness of Spatial Navigation
-    algorithm: focusable elements in an scrollable containers (e.g. <div>) should be
-    accessible, including offscreen content.
-
-    * Pre-conditions:
-    1) DRT support for SNav enable/disable.
-
-    * Navigation steps:
-    1) Loads this page, focus goes to "start" automatically.
-    2) Move focus down to the visible focusable element in
-       scrollable div.
-    3) Traverse the page through other focusable elements down the page.
-       and then back up.
-
-    * Expected results: All focusable element in scrollable content, including
-    offscreen ones, should be accessible via SNav. -->
-  <head>
-    <style type="text/css">
-      .offscreen {
-        position: absolute;
-        left: -1000em;
-      }
-    </style>
-
-    <script src="../../js/resources/js-test-pre.js"></script>
-    <script src="resources/spatial-navigation-utils.js"></script>
-    <script type="application/javascript">
-
-    var resultMap = [
-      ["Left", "1"],
-      ["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();
-
-      initTest(resultMap, testCompleted);
-    }
-
-    function testCompleted()
-    {
-      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">
-
-    <div style="margin-left:120px">
-      <a id="off" class="offscreen" href="a">offscreen content</a>
-      <a id="start" href="a">Right link</a>
-    </div><br>
-    <a id="1" href="a">Down link</a><br>
-    <div id="console"></div>
-  </body>
-</html>
-
diff --git a/LayoutTests/fast/events/spatial-navigation/snav-only-clipped-overflow-content.html b/LayoutTests/fast/events/spatial-navigation/snav-only-clipped-overflow-content.html
deleted file mode 100644
index 8fb9817..0000000
--- a/LayoutTests/fast/events/spatial-navigation/snav-only-clipped-overflow-content.html
+++ /dev/null
@@ -1,77 +0,0 @@
-<html>
-  <!--
-    This test ensures the content overflow traversal correctness of spatial navigation:
-    if an element if clipped overflow in a scrollable container (e.g. <div>),
-    scroll-in-direction should happen in the container box, not on the outer view.
-
-    * Pre-conditions:
-    1) DRT support for spatial navigation enable/disable.
-
-    * Navigation steps:
-    1) Loads this page, focus goes to "start" automatically.
-    2) Try to move focus down to the visible focusable element in
-       scrollable div.
-
-    * Expected results: There should have to a scroll action in the container
-    (div) as an attempt to make the clipped overflow node visible and accessible
-    via spatial navigation. -->
-  <head>
-    <style type="text/css">
-      div.scroll {
-        height: 200px;
-        width: 300px;
-        overflow: auto;
-        border: 1px solid #666;
-        background-color: #ccc;
-        padding: 8px;
-      }
-    </style>
-
-    <script src="../../js/resources/js-test-pre.js"></script>
-    <script src="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();
-
-      initTest(resultMap, testCompleted);
-    }
-
-    function testCompleted()
-    {
-      shouldBeTrue(String(document.getElementById("div").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">
-    <p>That is is a normal <a id="start" href="a">link</a>.</p>
-    <div class="scroll" id="div">
-      <p>This is a scrollable Div created with the CSS property overflow.</p>
-      <br><br><br><br><br><br><br><br>
-      <p> ... and here we have a clipped overflow <a id="1" href="a">link</a>.</p>
-    </div>
-    <p>And this is another normal <a id="2" href="a">link_2</a>.</p>
-    <div id="console"></div>
-  </body>
-</html>
diff --git a/LayoutTests/fast/events/spatial-navigation/snav-radio-group.html b/LayoutTests/fast/events/spatial-navigation/snav-radio-group.html
deleted file mode 100644
index 403f97a..0000000
--- a/LayoutTests/fast/events/spatial-navigation/snav-radio-group.html
+++ /dev/null
@@ -1,109 +0,0 @@
-<html>
-  <!--
-    This test ensures the correctness of Spatial Navigation (SNav) algorithm over single select element.
-
-    * Pre-conditions:
-    1) DRT support for SNav enable/disable.
-
-    * Navigation steps:
-    1) Loads this page, focus goes to "start" automatically.
-    2) Focus moves away from select in 4 different directions to neighbor nodes and back.
-  -->
-  <head>
-    <script src="../../js/resources/js-test-pre.js"></script>
-    <script src="resources/spatial-navigation-utils.js"></script>
-    <script type="application/javascript">
-
-    var resultMap = [
-      ["Down", "down"],
-      ["Down", "8"],
-      ["Up", "down"],
-      ["Up", "start"],
-      ["Up", "up"],
-      ["Up", "2"],
-      ["Down", "up"],
-      ["Down", "start"],
-      ["Right", "right"],
-      ["Right", "6"],
-      ["Left", "right"],
-      ["Left", "start"],
-      ["Left", "left"],
-      ["Left", "4"],
-      ["Right", "left"],
-      ["Right", "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();
-
-      initTest(resultMap, testCompleted);
-    }
-
-    function testCompleted()
-    {
-      if (window.layoutTestController)
-        shouldBe("document.getElementById('down').checked", "true");            
-        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">
-    <table style="text-align: left; width: 100%; margin-left: auto; margin-right: auto;" border="1" cellpadding="2" cellspacing="1">
-      <tbody>
-        <tr>
-          <td style="vertical-align: center; text-align: center;"></td>
-          <td style="vertical-align: center; text-align: center;"><a id="2" href="a">2</a></td>
-          <td style="vertical-align: center; text-align: center;"></td>
-        </tr>
-        <tr>
-          <td style="vertical-align: center; text-align: center;"><a id="4" href="a">4</a></td>
-          <td style="vertical-align: center; text-align: center;">
-            <table style="text-align: center; width: 100%; margin-left: auto; margin-right: auto;" border="1" cellpadding="2" cellspacing="1">
-              <tbody>
-                <tr>
-                  <td style="vertical-align: center; text-align: center;"></td>
-                  <td style="vertical-align: center; text-align: center;"><input type="radio" name="group" id="up" ></td>
-                  <td style="vertical-align: center; text-align: center;"></td>
-                </tr>
-                <tr>
-                  <td style="vertical-align: center; text-align: center;"><input type="radio" name="group" id="left" ></td>
-                  <td style="vertical-align: center; text-align: center;">
-                    <input type="radio" name="group" id="start" >
-                  </td>
-                  <td style="vertical-align: center; text-align: center;"><input type="radio" name="group" id="right" ></td>
-                </tr>
-                <tr>
-                  <td style="vertical-align: center; text-align: center;"></td>
-                  <td style="vertical-align: center; text-align: center;"><input type="radio" name="group" id="down" checked ></td>
-                  <td style="vertical-align: center; text-align: center;"></td>
-                </tr>
-              </tbody>
-            </table>
-          </td>
-          <td style="vertical-align: center; text-align: center;"><a id="6" href="a">6</a></td>
-        </tr>
-        <tr>
-          <td style="vertical-align: center; text-align: center;"></td>
-          <td style="vertical-align: center; text-align: center;"><a id="8" href="a">8</a></td>
-          <td style="vertical-align: center; text-align: center;"></td>
-        </tr>
-      </tbody>
-    </table>
-    <div id="console"></div>
-  </body>
-</html>
-
diff --git a/LayoutTests/fast/events/spatial-navigation/snav-radio.html b/LayoutTests/fast/events/spatial-navigation/snav-radio.html
deleted file mode 100644
index ee60cde..0000000
--- a/LayoutTests/fast/events/spatial-navigation/snav-radio.html
+++ /dev/null
@@ -1,78 +0,0 @@
-<html>
-  <!--
-    This test ensures the correctness of Spatial Navigation (SNav) algorithm over single select element.
-
-    * Pre-conditions:
-    1) DRT support for SNav enable/disable.
-
-    * Navigation steps:
-    1) Loads this page, focus goes to "start" automatically.
-    2) Focus moves away from select in 4 different directions to neighbor nodes and back.
-  -->
-  <head>
-    <script src="../../js/resources/js-test-pre.js"></script>
-    <script src="resources/spatial-navigation-utils.js"></script>
-    <script type="application/javascript">
-
-    var resultMap = [
-      ["Down", "8"],
-      ["Up", "start"],
-      ["Up", "2"],
-      ["Down", "start"],
-      ["Right", "6"],
-      ["Left", "start"],
-      ["Left", "4"],
-      ["Right", "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();
-
-      initTest(resultMap, testCompleted);
-    }
-
-    function testCompleted()
-    {
-      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">
-    <table style="text-align: left; width: 100%; margin-left: auto; margin-right: auto;" border="1" cellpadding="2" cellspacing="1">
-      <tbody>
-        <tr>
-          <td style="vertical-align: top; text-align: center;"></td>
-          <td style="vertical-align: top; text-align: center;"><a id="2" href="a">2</a></td>
-          <td style="vertical-align: top; text-align: center;"></td>
-        </tr>
-        <tr>
-          <td style="vertical-align: top; text-align: center;"><a id="4" href="a">4</a></td>
-          <td style="vertical-align: top; text-align: center;"><input type="radio" id="start" ></td>
-          <td style="vertical-align: top; text-align: center;"><a id="6" href="a">6</a></td>
-        </tr>
-        <tr>
-          <td style="vertical-align: top; text-align: center;"></td>
-          <td style="vertical-align: top; text-align: center;"><a id="8" href="a">8</a></td>
-          <td style="vertical-align: top; text-align: center;"></td>
-        </tr>
-      </tbody>
-    </table>
-    <div id="console"></div>
-  </body>
-</html>
-
diff --git a/LayoutTests/fast/events/spatial-navigation/snav-simple-content-overflow.html b/LayoutTests/fast/events/spatial-navigation/snav-simple-content-overflow.html
deleted file mode 100644
index e3e9f59..0000000
--- a/LayoutTests/fast/events/spatial-navigation/snav-simple-content-overflow.html
+++ /dev/null
@@ -1,74 +0,0 @@
-<html>
-  <!--
-    This test ensures that overflowed content can be focused by Spatial Navigation.
-
-    * Pre-conditions:
-    1) DRT support for SNav enable/disable.
-
-    * Navigation steps:
-    1) Loads this page, focus goes to "start" automatically.
-    3) Try to traverse the links on page down.
-       and then back up.
-
-    * Expected results: After 'start' gets the focus, tapping down arrow should scroll its
-      enclosing scrollable container (<div>) down, and *not* move focus to the link whose id is '2'.
-  -->
-  <head>
-    <style type="text/css">
-      div.scroll {
-        height: 200px;
-        width: 300px;
-        overflow: auto;
-        border: 1px solid #666;
-        background-color: #ccc;
-        padding: 8px;
-      }
-    </style>
-
-    <script src="../../js/resources/js-test-pre.js"></script>
-    <script src="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();
-
-      initTest(resultMap, testCompleted);
-    }
-
-    function testCompleted()
-    {
-      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">
-    <div class="scroll">
-      <p>It has a visible <a id="start" href="a">link_1</a>.</p>
-      <br><br><br><br><br><br><br><br><br>
-      <p>... and an overflowed link like <a id="1" href="a">this</a>.</p>
-    </div>
-    <br><br><br><br><br><br><br>
-    <p>This link should NOT get <a id="start" href="a">focused</a>.</p>
-    <div id="console"></div>
-  </body>
-</html>
diff --git a/LayoutTests/fast/events/spatial-navigation/snav-single-select.html b/LayoutTests/fast/events/spatial-navigation/snav-single-select.html
deleted file mode 100644
index fd768cc..0000000
--- a/LayoutTests/fast/events/spatial-navigation/snav-single-select.html
+++ /dev/null
@@ -1,96 +0,0 @@
-<html>
-  <!--
-    This test ensures the correctness of Spatial Navigation (SNav) algorithm over single select element.
-
-    * Pre-conditions:
-    1) DRT support for SNav enable/disable.
-
-    * Navigation steps:
-    1) Loads this page, focus goes to "start" automatically.
-    2) Focus moves away from select in 4 different directions to neighbor nodes and back.
-  -->
-  <head>
-    <script src="../../js/resources/js-test-pre.js"></script>
-    <script src="resources/spatial-navigation-utils.js"></script>
-    <script type="application/javascript">
-
-    var resultMap = [
-      ["Down", "8"],
-      ["Up", "start"],
-      ["Up", "2"],
-      ["Down", "start"],
-      ["Right", "6"],
-      ["Left", "start"],
-      ["Left", "4"],
-      ["Right", "start"],
-      ["Space", "start"],
-      ["Down", "start"],
-      ["Up", "start"],
-      ["Space", "start"],
-      ["Down", "8"],
-      ["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();
-
-      initTest(resultMap, additionalTest);
-    }
-
-    function additionalTest()
-    {
-      document.getElementById("start").focus();
-      shouldBe("gFocusedDocument.getElementById(\"start\").selectedIndex", "0");
-      eventSender.keyDown(" ");
-      eventSender.keyDown("downArrow");
-      shouldBe("gFocusedDocument.getElementById(\"start\").selectedIndex", "1");
-      eventSender.keyDown("upArrow");
-      shouldBe("gFocusedDocument.getElementById(\"start\").selectedIndex", "0");
-
-      testCompleted();
-    }
-
-    function testCompleted()
-    {
-      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">
-    <table style="text-align: left; width: 100%; margin-left: auto; margin-right: auto;" border="1" cellpadding="2" cellspacing="1">
-      <tbody>
-        <tr>
-          <td style="vertical-align: top; text-align: center;"></td>
-          <td style="vertical-align: top; text-align: center;"><a id="2" href="a">2</a></td>
-          <td style="vertical-align: top; text-align: center;"></td>
-        </tr>
-        <tr>
-          <td style="vertical-align: top; text-align: center;"><a id="4" href="a">4</a></td>
-          <td style="vertical-align: top; text-align: center;"><select id="start"><option>1</option><option>2</option><option>3</option></select></td>
-          <td style="vertical-align: top; text-align: center;"><a id="6" href="a">6</a></td>
-        </tr>
-        <tr>
-          <td style="vertical-align: top; text-align: center;"></td>
-          <td style="vertical-align: top; text-align: center;"><a id="8" href="a">8</a></td>
-          <td style="vertical-align: top; text-align: center;"></td>
-        </tr>
-      </tbody>
-    </table>
-    <div id="console"></div>
-  </body>
-</html>
-
diff --git a/LayoutTests/fast/events/spatial-navigation/snav-table-traversal.html b/LayoutTests/fast/events/spatial-navigation/snav-table-traversal.html
deleted file mode 100644
index 572f6db..0000000
--- a/LayoutTests/fast/events/spatial-navigation/snav-table-traversal.html
+++ /dev/null
@@ -1,86 +0,0 @@
-<html>
-  <!--
-    This test ensures the basic table traversal correctness of
-    Spatial Navigation (SNav) algorithm: focusable elements in a
-    <table> should be accessible.
-
-    * Pre-conditions:
-    1) DRT support for SNav enable/disable.
-
-    * Navigation steps:
-    1) Loads this page, focus goes to "start" automatically.
-    2) Focus moves along through the sparsely positioned elements
-       in the table, eventually going to an outer southward link,
-       but going back inside the table later on.
-  -->
-  <head>
-    <script src="../../js/resources/js-test-pre.js"></script>
-    <script src="resources/spatial-navigation-utils.js"></script>
-    <script type="application/javascript">
-
-    var resultMap = [
-      ["Down", "4"],
-      ["Down", "7"],
-      ["Down", "end"],
-      ["Up", "7"],
-      ["Right", "8"],
-      ["Right", "9"],
-      ["Up", "6"],
-      ["Up", "3"],
-      ["Left", "2"],
-      ["Left", "1"],
-      ["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();
-
-      initTest(resultMap, testCompleted);
-    }
-
-    function testCompleted()
-    {
-      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">
-    <table style="text-align: left; width: 100%; margin-left: auto; margin-right: auto;" border="1" cellpadding="2" cellspacing="1">
-      <tbody>
-        <tr>
-          <td style="vertical-align: top; text-align: center;"><a id="start" href="a">a</a></td>
-          <td style="vertical-align: top; text-align: center;"><a id="2" href="a">a</a></td>
-          <td style="vertical-align: top; text-align: center;"><a id="3" href="a">a</a></td>
-        </tr>
-        <tr>
-          <td style="vertical-align: top; text-align: center;"><a id="4" href="a">a</a></td>
-          <td style="vertical-align: top; text-align: center;"><a id="5" href="a">a</a></td>
-          <td style="vertical-align: top; text-align: center;"><a id="6" href="a">a</a></td>
-        </tr>
-        <tr>
-          <td style="vertical-align: top; text-align: center;"><a id="7" href="a">a</a></td>
-          <td style="vertical-align: top; text-align: center;"><a id="8" href="a">a</a></td>
-          <td style="vertical-align: top; text-align: center;"><a id="9" href="a">a</a></td>
-        </tr>
-      </tbody>
-    </table>
-    <div style='margin-top:100px'>
-      <a id="end" href="a">End of table traversal test</a>
-    </div>
-    <div id="console"></div>
-  </body>
-</html>
diff --git a/LayoutTests/fast/events/spatial-navigation/snav-textarea.html b/LayoutTests/fast/events/spatial-navigation/snav-textarea.html
deleted file mode 100644
index 0d01396..0000000
--- a/LayoutTests/fast/events/spatial-navigation/snav-textarea.html
+++ /dev/null
@@ -1,84 +0,0 @@
-<!DOCTYPE html>
-  <head>
-    <script src="../../js/resources/js-test-pre.js"></script>
-    <script src="resources/spatial-navigation-utils.js"></script>
-    <script src="../js/resources/js-test-post.js"></script>
-  </head>
-  <body id="some-content" xmlns="http://www.w3.org/1999/xhtml">
-    <p id="description"></p>
-    <table style="text-align: left; width: 100%; margin-left: auto; margin-right: auto;" border="1" cellpadding="2" cellspacing="1">
-      <tbody>
-        <tr>
-          <td style="vertical-align: top; text-align: center;"></td>
-          <td style="vertical-align: top; text-align: center;"><a id="2" href="a">2</a></td>
-          <td style="vertical-align: top; text-align: center;"></td>
-        </tr>
-        <tr>
-          <td style="vertical-align: top; text-align: center;"><a id="4" href="a">4</a></td>
-          <td style="vertical-align: top; text-align: center;"><textarea id="start" rows="5" cols="2">abc d</textarea>
-          <td style="vertical-align: top; text-align: center;"><a id="6" href="a">6</a></td>
-        </tr>
-        <tr>
-          <td style="vertical-align: top; text-align: center;"></td>
-          <td style="vertical-align: top; text-align: center;"><a id="8" href="a">8</a></td>
-          <td style="vertical-align: top; text-align: center;"></td>
-        </tr>
-      </tbody>
-    </table>
-    <div id="console"></div>
-    <script type="application/javascript">
-    description('This test ensures the correctness of Spatial Navigation (SNav) algorithm over textarea.<br>\
-                * Pre-conditions:<br>\
-                1) DRT support for SNav enable/disable.<br>\
-                * Navigation steps:<br>\
-                1) Loads this page, focus goes to "start" automatically.<br>\
-                2) Focus moves away from textarea in 4 different directions to neighbor nodes and back.<br>');
-
-    var resultMap = [
-      ["Down", "start"],
-      ["Down", "start"],
-      ["Down", "8"],
-      ["Up", "start"],
-      ["Up", "2"],
-      ["Down", "start"],
-      ["Right", "start"],
-      ["Right", "start"],
-      ["Right", "start"],
-      ["Right", "start"],
-      ["Right", "start"],
-      ["Right", "6"],
-      ["Left", "start"],
-      ["Left", "4"],
-      ["Right", "start"],
-      ["DONE", "DONE"]
-    ];
-
-    if (window.layoutTestController) {
-      layoutTestController.dumpAsText();
-      layoutTestController.setSpatialNavigationEnabled(true);
-      layoutTestController.overridePreference("WebKitTabToLinksPreferenceKey", 1);
-      layoutTestController.waitUntilDone();
-    }
-
-    function runTest()
-    {
-      var textarea = document.getElementById("start");
-      textarea.value = "abc\nd";
-
-      // starting the test itself: get to a known place.
-      document.getElementById("start").focus();
-
-      initTest(resultMap, testCompleted);
-    }
-
-    function testCompleted()
-    {
-      if (window.layoutTestController)
-        layoutTestController.notifyDone();
-    }
-
-    window.onload = runTest;
-
-    </script>
-  </body>
-</html>
diff --git a/LayoutTests/fast/events/spatial-navigation/snav-tiny-table-traversal.html b/LayoutTests/fast/events/spatial-navigation/snav-tiny-table-traversal.html
deleted file mode 100644
index de5a003..0000000
--- a/LayoutTests/fast/events/spatial-navigation/snav-tiny-table-traversal.html
+++ /dev/null
@@ -1,93 +0,0 @@
-<html>
-  <!--
-    This test ensures the basic table traversal correctness of
-    Spatial Navigation (SNav) algorithm: focusable elements in a
-    <table> should be accessible.
-
-    * Pre-conditions:
-    1) DRT support for SNav enable/disable.
-
-    * Navigation steps:
-    1) Loads this page, focus goes to "start" automatically.
-    2) Focus moves along the elements in the table, eventually
-       going to outer southward and eastward links, but going
-       back inside the table later on.
-  -->
-  <head>
-    <script src="../../js/resources/js-test-pre.js"></script>
-    <script src="resources/spatial-navigation-utils.js"></script>
-    <script type="application/javascript">
-
-    var resultMap = [
-      ["Down", "1"],
-      ["Down", "4"],
-      ["Down", "7"],
-      ["Down", "end"],
-      ["Up", "7"],
-      ["Right", "8"],
-      ["Right", "9"],
-      ["Up", "6"],
-      ["Right", "right"],
-      ["Left", "6"],
-      ["Up", "3"],
-      ["Left", "2"],
-      ["Left", "1"],
-      ["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();
-
-      initTest(resultMap, testCompleted);
-    }
-
-    function testCompleted()
-    {
-      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">a</a><br>
-    <table>
-      <tbody>
-        <tr>
-          <td style="font-size: small;"><a id="1" href="a">a</a></td>
-          <td style="font-size: small;"><a id="2" href="a">a</a></td>
-          <td style="font-size: small;"><a id="3" href="a">a</a></td>
-        </tr>
-        <tr>
-          <td style="font-size: small;"><a id="4" href="a">a</a></td>
-          <td style="font-size: small;"><a id="5" href="a">a</a></td>
-          <td style="font-size: small;"><a id="6" href="a">a</a></td>
-        </tr>
-        <tr>
-          <td style="font-size: small;"><a id="7" href="a">a</a></td>
-          <td style="font-size: small;"><a id="8" href="a">a</a></td>
-          <td style="font-size: small;"><a id="9" href="a">a</a></td>
-        </tr>
-      </tbody>
-    </table>
-    <div style='margin-top:8px'>
-      <a id="end" href="a">a<a>
-    </div>
-    <div style="margin-left: 50px; margin-top:-70px">
-      <a id="right" href="http://www.google.com">a</a>
-    </div>
-    <div style="margin-top:100px" id="console"></div>
-  </body>
-</html>
diff --git a/LayoutTests/fast/events/spatial-navigation/snav-unit-overflow-and-scroll-in-direction.html b/LayoutTests/fast/events/spatial-navigation/snav-unit-overflow-and-scroll-in-direction.html
deleted file mode 100644
index 39e53b4..0000000
--- a/LayoutTests/fast/events/spatial-navigation/snav-unit-overflow-and-scroll-in-direction.html
+++ /dev/null
@@ -1,96 +0,0 @@
-<html>
-  <!--
-    This test ensures the correctness the following Spatial Navigation
-    (SNav) algorithm features.
-
-    1) There is no unit overflow in the Spatial Navigation algorithm while
-       calculating the best node candidate to move focus to. To test that this
-       page positions some elements 10000000 pixels far from each other (distance
-       that can considered large enough for most of the Web Pages on the
-       Internet).
-
-    2) Make sure that a best focusable candidate only gets focused
-       if it is visible in the current Viewport. Scroll-in-direction
-       is performed otherwise.
-
-    * Pre-conditions:
-    1) DRT support for SNav enable/disable.
-
-    * Navigation steps:
-    1) Loads this page, focus goes to "start" automatically.
-    2) Attempt to move focus down to "end. As it is too far and out of
-       viewport, focus change will not happen and page will be scrolled
-       a step down.
-    3) By sending an "End" keypress, page gets scrolled down to a place
-       where the "end" node gets visible in the viewport.
-    4) Step _1_ is ran again, and "end" gets focused. -->
-  <head>
-    <script src="../../js/resources/js-test-pre.js"></script>
-    <script src="resources/spatial-navigation-utils.js"></script>
-    <script type="application/javascript">
-
-    var resultMap1 = [
-      ["Down", "start"],
-      ["", ""]
-    ];
-
-    var resultMap2 = [
-      ["Down", "end"],
-      ["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();
-
-      setTimeout(step1 , 0);
-      setTimeout(step2 , 50);
-    }
-
-    function step1()
-    {
-      // Actions in 'resultMap1' should keep the focus in the currently
-      // focused element ('start') once the best candidate ('end') is not
-      // visible in current viewport.
-      initTest(resultMap1);
-    }
-
-    function step2()
-    {
-      shouldBeTrue(String(document.body.scrollTop != 0));
-
-      // Then it scrolls down to the end of the page ...
-      if (window.eventSender)
-        eventSender.keyDown("end");
-
-      // And 'resultMap2' re-tries to move focus down.
-      initTest(resultMap2, testCompleted);
-    }
-
-    function testCompleted()
-    {
-      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:100000000px'>
-        <a id="end" href="a">End</a>
-    </div>
-    <div id="console"></div>
-  </body>
-</html>
diff --git a/LayoutTests/fast/events/spatial-navigation/snav-z-index.html b/LayoutTests/fast/events/spatial-navigation/snav-z-index.html
deleted file mode 100644
index ddecbf6..0000000
--- a/LayoutTests/fast/events/spatial-navigation/snav-z-index.html
+++ /dev/null
@@ -1,80 +0,0 @@
-<html>
-  <head>
-    <script src="../../js/resources/js-test-pre.js"></script>
-    <script src="resources/spatial-navigation-utils.js"></script>
-    <script type="application/javascript">
-
-    var resultMap = [
-      ["Down", "p11"],
-      ["Down", "p12"],
-      ["Down", "s25"],
-      ["Up", "p12"],
-      ["Left", "s13"],
-      ["Up", "s12"],
-      ["Right", "p11"],
-      ["Right", "p21"],
-      ["Up", "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();
-
-      initTest(resultMap, testCompleted);
-    }
-
-    function testCompleted()
-    {
-      if (window.layoutTestController)
-        layoutTestController.notifyDone();
-    }
-
-    window.onload = runTest;
-    </script>
-    <script src="../js/resources/js-test-post.js"></script>
-    <style>
-    div.simple { border: 3px solid red;}
-    div.simple:focus { border: 3px solid gray;}
-    div.positioned { border: 3px solid blue;}
-    div.positioned:focus{ border: 3px solid gray;}
-    #popup {position: absolute; top:120; left:240; border: 8px solid black; z-index:1000}
-    </style>
-  </head>
-<body id="some-content" xmlns="http://www.w3.org/1999/xhtml" style="padding:20px">
-<div id="popup">
-<table><tr><td>
-<div tabindex="1" id="p11" class="positioned"><img src="resources/green.png" width=160px height=60px></div>
-<div tabindex="2" id="p12" class="positioned"><img src="resources/green.png" width=160px height=60px></div>
-</td><td>
-<div tabindex="1" id="p21" class="positioned"><img src="resources/green.png" width=160px height=60px></div>
-<div tabindex="2" id="p22" class="positioned"><img src="resources/green.png" width=160px height=60px></div>
-</td></tr></table>
-</div>
-
-<table>
-<tr><td>
-<div tabindex="1" id="s11" class="simple"><img src="resources/green.png" width=160px height=60px></div>
-<div tabindex="2" id="s12" class="simple"><img src="resources/green.png" width=160px height=60px></div>
-<div tabindex="3" id="s13" class="simple"><img src="resources/green.png" width=160px height=60px></div>
-<div tabindex="4" id="s14" class="simple"><img src="resources/green.png" width=160px height=60px></div>
-<div tabindex="5" id="s15" class="simple"><img src="resources/green.png" width=160px height=60px></div>
-</td><td>
-<div tabindex="1" id="start" class="simple"><img src="resources/green.png" width=160px height=60px></div>
-<div tabindex="2" id="s22" class="simple"><img src="resources/green.png" width=160px height=60px></div>
-<div tabindex="3" id="s23" class="simple"><img src="resources/green.png" width=160px height=60px></div>
-<div tabindex="4" id="s24" class="simple"><img src="resources/green.png" width=160px height=60px></div>
-<div tabindex="5" id="s25" class="simple"><img src="resources/green.png" width=160px height=60px></div>
-</td></tr></table>
-<div id="console"></div>
-This test is testing that we prefer focusable elements with absolute positioning over other elements.
-</body>
-</html>
diff --git a/LayoutTests/fast/events/spatial-navigation/snav-zero-margin-content.html b/LayoutTests/fast/events/spatial-navigation/snav-zero-margin-content.html
deleted file mode 100644
index a629890..0000000
--- a/LayoutTests/fast/events/spatial-navigation/snav-zero-margin-content.html
+++ /dev/null
@@ -1,70 +0,0 @@
-<html>
-  <!--
-    This test ensures the traversal correctness of spatial navigation:
-    focusable elements accessible, including zero-margin content, should be
-    accessible.
-  -->
-  <head>
-    <style type="text/css">
-      body {
-        background:none repeat scroll 0 0 #FFFFFF;
-        color:black;
-        margin:0;
-      }
-
-      body, a, {
-        font-family:arial,sans-serif;
-        margin-right:2.5em;
-        font-size:13px;
-        text-decoration:underline;
-        color:#0000CC !important;
-      }
-    </style>
-
-    <script src="../../js/resources/js-test-pre.js"></script>
-    <script src="resources/spatial-navigation-utils.js"></script>
-    <script type="application/javascript">
-
-    var resultMap = [
-      ["Right", "end"],
-      ["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();
-
-      initTest(resultMap, testCompleted);
-    }
-
-    function testCompleted()
-    {
-      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">
-    <span>
-      <div>
-        <nobr>
-          <a href="#" id="start"> test1 </a>
-          <a href="#" id="end"> test2 </a>
-        </nobr>
-      </div>
-    </span>
-    <div id="console"></div>
-  </body>
-</html>
diff --git a/LayoutTests/fast/events/spatial-navigation/resources/iframe.html b/LayoutTests/fast/spatial-navigation/resources/iframe.html
similarity index 100%
rename from LayoutTests/fast/events/spatial-navigation/resources/iframe.html
rename to LayoutTests/fast/spatial-navigation/resources/iframe.html
diff --git a/LayoutTests/fast/events/spatial-navigation/resources/spatial-navigation-utils.js b/LayoutTests/fast/spatial-navigation/resources/spatial-navigation-utils.js
similarity index 100%
rename from LayoutTests/fast/events/spatial-navigation/resources/spatial-navigation-utils.js
rename to LayoutTests/fast/spatial-navigation/resources/spatial-navigation-utils.js
diff --git a/LayoutTests/fast/events/spatial-navigation/snav-1st-stop-expected.txt b/LayoutTests/fast/spatial-navigation/snav-1st-stop-expected.txt
similarity index 100%
rename from LayoutTests/fast/events/spatial-navigation/snav-1st-stop-expected.txt
rename to LayoutTests/fast/spatial-navigation/snav-1st-stop-expected.txt
diff --git a/LayoutTests/fast/spatial-navigation/snav-1st-stop.html b/LayoutTests/fast/spatial-navigation/snav-1st-stop.html
new file mode 100644
index 0000000..bf0f361
--- /dev/null
+++ b/LayoutTests/fast/spatial-navigation/snav-1st-stop.html
@@ -0,0 +1,68 @@
+<html>
+  <!--
+    This test ensures the correctness of Spatial Navigation (SNav) algorithm from a non-focus scenario.
+
+    * Pre-conditions:
+    1) DRT support for SNav enable/disable.
+
+    * Navigation steps:
+    1) Loads this page and send key down.
+    2) The 1st link should be focused.
+  -->
+  <head>
+    <script src="../js/resources/js-test-pre.js"></script>
+    <script src="resources/spatial-navigation-utils.js"></script>
+    <script type="application/javascript">
+
+    var resultMap = [
+      ["Down", "1"],
+      ["DONE", "DONE"]
+    ];
+
+    if (window.layoutTestController) {
+      layoutTestController.dumpAsText();
+      layoutTestController.setSpatialNavigationEnabled(true);
+      layoutTestController.overridePreference("WebKitTabToLinksPreferenceKey", 1);
+      layoutTestController.waitUntilDone();
+    }
+
+    function runTest()
+    {
+      // starting the test from no focused node.
+      initTest(resultMap, testCompleted);
+    }
+
+    function testCompleted()
+    {
+      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">
+    <table style="text-align: left; width: 100%; margin-left: auto; margin-right: auto;" border="1" cellpadding="2" cellspacing="1">
+      <tbody>
+        <tr>
+          <td style="vertical-align: top; text-align: center;"><a id="1" href="a">1</a></td>
+          <td style="vertical-align: top; text-align: center;"><a id="2" href="a">2</a></td>
+          <td style="vertical-align: top; text-align: center;"><a id="3" href="a">3</a></td>
+        </tr>
+        <tr>
+          <td style="vertical-align: top; text-align: center;"><a id="4" href="a">4</a></td>
+          <td style="vertical-align: top; text-align: center;"><a id="5" href="a">5</td>
+          <td style="vertical-align: top; text-align: center;"><a id="6" href="a">6</a></td>
+        </tr>
+        <tr>
+          <td style="vertical-align: top; text-align: center;"><a id="7" href="a">7</a></td>
+          <td style="vertical-align: top; text-align: center;"><a id="8" href="a">8</a></td>
+          <td style="vertical-align: top; text-align: center;"><a id="9" href="a">9</a></td>
+        </tr>
+      </tbody>
+    </table>
+    <div id="console"></div>
+  </body>
+</html>
diff --git a/LayoutTests/fast/events/spatial-navigation/snav-clipped-overflowed-content-expected.txt b/LayoutTests/fast/spatial-navigation/snav-clipped-overflowed-content-expected.txt
similarity index 100%
rename from LayoutTests/fast/events/spatial-navigation/snav-clipped-overflowed-content-expected.txt
rename to LayoutTests/fast/spatial-navigation/snav-clipped-overflowed-content-expected.txt
diff --git a/LayoutTests/fast/spatial-navigation/snav-clipped-overflowed-content.html b/LayoutTests/fast/spatial-navigation/snav-clipped-overflowed-content.html
new file mode 100644
index 0000000..adb90b8
--- /dev/null
+++ b/LayoutTests/fast/spatial-navigation/snav-clipped-overflowed-content.html
@@ -0,0 +1,92 @@
+<html>
+  <!--
+    This test ensures the correctness of a basic aspect of spatial navigation traversal
+    routines: focusable elements in scrollable containers (e.g. <div>) should be
+    accessible, including offscreen content.
+
+    * Pre-conditions:
+    1) DRT support for spatial navivation enable/disable.
+
+    * Navigation steps:
+    1) Loads this page, focus goes to "start" automatically.
+    2) Move focus down to the visible focusable element in
+       scrollable div.
+    3) Traverse the page through other focusable elements down the page.
+       and then back up.
+
+    * Expected results: All focusable element in scrollable content, including
+    offscreen ones, should be accessible via spatial navigation. -->
+  <head>
+    <style type="text/css">
+      div.scroll {
+        height: 200px;
+        width: 300px;
+        overflow: auto;
+        border: 1px solid #666;
+        background-color: #ccc;
+        padding: 8px;
+      }
+    </style>
+
+    <script src="../js/resources/js-test-pre.js"></script>
+    <script src="resources/spatial-navigation-utils.js"></script>
+    <script type="application/javascript">
+
+    var resultMap = [
+      ["Down", "1"],
+      ["Down", "1"],
+      ["Down", "2"],
+      ["Down", "2"],
+      ["Down", "2"],
+      ["Down", "3"],
+      ["Up", "2"],
+      ["Up", "2"],
+      ["Up", "2"],
+      ["Up", "1"],
+      ["Up", "1"],
+      ["Up", "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();
+
+      initTest(resultMap, testCompleted);
+    }
+
+    function testCompleted()
+    {
+      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"><img src="resources/green.png" width=30px height=30px></a>
+    <div class="scroll">
+      <a id="1" href="a"><img src="resources/green.png" width=30px height=30px></a>
+      <div></div>
+      <img src="resources/green.png" width=200px height=200px>
+      <div></div>
+      <a id="2" href="a"><img src="resources/green.png" width=30px height=30px></a>.</p>
+    </div>
+    <a id="3" href="a"><img src="resources/green.png" width=30px height=30px></a>
+    <div id="console"></div>
+    <div>This test tests that a div with css overflow:auto will scroll to reveal its focusable elements</div>
+  </body>
+</html>
+
diff --git a/LayoutTests/fast/events/spatial-navigation/snav-container-only-white-space-expected.txt b/LayoutTests/fast/spatial-navigation/snav-container-only-white-space-expected.txt
similarity index 100%
rename from LayoutTests/fast/events/spatial-navigation/snav-container-only-white-space-expected.txt
rename to LayoutTests/fast/spatial-navigation/snav-container-only-white-space-expected.txt
diff --git a/LayoutTests/fast/spatial-navigation/snav-container-only-white-space.html b/LayoutTests/fast/spatial-navigation/snav-container-only-white-space.html
new file mode 100644
index 0000000..1d768f6
--- /dev/null
+++ b/LayoutTests/fast/spatial-navigation/snav-container-only-white-space.html
@@ -0,0 +1,74 @@
+<html>
+  <!--
+    This test ensures the correctness of a basic aspect of spatial navigation traversal
+    routines: focusable elements in scrollable containers (e.g. <div>) should be
+    accessible, including offscreen content.
+
+    * Pre-conditions:
+    1) DRT support for spatial navivation enable/disable.
+
+    * Navigation steps:
+    1) Loads this page, focus goes to "start" automatically.
+    2) Move focus down to the visible focusable element in
+       scrollable div.
+    3) Traverse the page through other focusable elements down the page.
+       and then back up.
+
+    * Expected results: All focusable element in scrollable content, including
+    offscreen ones, should be accessible via spatial navigation. -->
+  <head>
+    <style>
+    :focus {outline: 1px solid black;}
+    </style>
+    <script src="../js/resources/js-test-pre.js"></script>
+    <script src="resources/spatial-navigation-utils.js"></script>
+    <script type="application/javascript">
+
+    var resultMap = [
+      ["Down", "2"],
+      ["Up", "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();
+
+      initTest(resultMap, testCompleted);
+    }
+
+    function testCompleted()
+    {
+      if (window.layoutTestController)
+        layoutTestController.notifyDone();
+    }
+
+    window.onload = runTest;
+
+    </script>
+    <script src="js/resources/js-test-post.js"></script>
+  </head>
+  <body>
+    <a href="#" id="start">This is an element</a><br>
+
+    <div>
+      <a href="#" id="1">
+      </a>
+    </div>
+
+    <div>
+      <a href="#" id="2">This is an element</a><br>
+    </div>
+    <div id="console"></div>
+    <div>This test tests that a anchor element with only white spaces gives the correct size in ContainerNode::getRect().</div>
+  </body>
+</html>
+
diff --git a/LayoutTests/fast/events/spatial-navigation/snav-container-white-space-expected.txt b/LayoutTests/fast/spatial-navigation/snav-container-white-space-expected.txt
similarity index 100%
rename from LayoutTests/fast/events/spatial-navigation/snav-container-white-space-expected.txt
rename to LayoutTests/fast/spatial-navigation/snav-container-white-space-expected.txt
diff --git a/LayoutTests/fast/spatial-navigation/snav-container-white-space.html b/LayoutTests/fast/spatial-navigation/snav-container-white-space.html
new file mode 100644
index 0000000..a89a845
--- /dev/null
+++ b/LayoutTests/fast/spatial-navigation/snav-container-white-space.html
@@ -0,0 +1,91 @@
+<html>
+  <!--
+    This test ensures the correctness of a basic aspect of spatial navigation traversal
+    routines: focusable elements in scrollable containers (e.g. <div>) should be
+    accessible, including offscreen content.
+
+    * Pre-conditions:
+    1) DRT support for spatial navivation enable/disable.
+
+    * Navigation steps:
+    1) Loads this page, focus goes to "start" automatically.
+    2) Move focus down to the visible focusable element in
+       scrollable div.
+    3) Traverse the page through other focusable elements down the page.
+       and then back up.
+
+    * Expected results: All focusable element in scrollable content, including
+    offscreen ones, should be accessible via spatial navigation. -->
+  <head>
+    <style>
+    :focus {outline: 1px solid black;}
+    </style>
+    <script src="../js/resources/js-test-pre.js"></script>
+    <script src="resources/spatial-navigation-utils.js"></script>
+    <script type="application/javascript">
+
+    var resultMap = [
+      ["Down", "1"],
+      ["Down", "2"],
+      ["Down", "3"],
+      ["Down", "4"],
+      ["Down", "5"],
+      ["Up", "4"],
+      ["Up", "3"],
+      ["Up", "2"],
+      ["Up", "1"],
+      ["Up", "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();
+
+      initTest(resultMap, testCompleted);
+    }
+
+    function testCompleted()
+    {
+      if (window.layoutTestController)
+        layoutTestController.notifyDone();
+    }
+
+    window.onload = runTest;
+
+    </script>
+    <script src="js/resources/js-test-post.js"></script>
+  </head>
+  <body>
+    <a href="#" id="start">This is an element</a><br>
+
+    <div>
+      <a href="#" id="1">
+        <img src="resources/green.png" height="42" width="76"  border="0"/>
+      </a>
+    </div>
+
+    <div>
+      <a href="#" id="2">This is an element</a><br>
+    </div>
+
+    <a href="#" id="3">This is an element</a><br>
+
+    <a href="#" id="4">
+      <img src="resources/green.png" height="42" width="76" alt="llinker1" border="0"/>
+    </a><br>
+
+    <a href="#" id="5">This is an element</a><br>
+    <div id="console"></div>
+    <div>This test tests that a anchor element with in image in it and a space after the image, can still give the correct size in ContainerNode::getRect().</div>
+  </body>
+</html>
+
diff --git a/LayoutTests/fast/events/spatial-navigation/snav-div-overflow-scrol-hidden-expected.txt b/LayoutTests/fast/spatial-navigation/snav-div-overflow-scrol-hidden-expected.txt
similarity index 100%
rename from LayoutTests/fast/events/spatial-navigation/snav-div-overflow-scrol-hidden-expected.txt
rename to LayoutTests/fast/spatial-navigation/snav-div-overflow-scrol-hidden-expected.txt
diff --git a/LayoutTests/fast/spatial-navigation/snav-div-overflow-scrol-hidden.html b/LayoutTests/fast/spatial-navigation/snav-div-overflow-scrol-hidden.html
new file mode 100644
index 0000000..0909daf
--- /dev/null
+++ b/LayoutTests/fast/spatial-navigation/snav-div-overflow-scrol-hidden.html
@@ -0,0 +1,70 @@
+<html>
+<head>
+    <script src="../js/resources/js-test-pre.js"></script>
+    <script src="resources/spatial-navigation-utils.js"></script>
+    <script type="application/javascript">
+
+    var resultMap = [
+      ["Down", "f2"],
+      ["Down", "f3"],
+      ["Down", "f3"],
+      ["Down", "f4"],
+      ["Down", "f4"],
+      ["Down", "f5"],
+      ["Down", "f6"],
+      ["Down", "f9"],
+      ["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();
+
+      initTest(resultMap, testCompleted);
+    }
+
+    function testCompleted()
+    {
+      if (window.layoutTestController)
+        layoutTestController.notifyDone();
+    }
+
+    window.onload = runTest;
+    </script>
+    <script src="js/resources/js-test-post.js"></script>
+    <style>
+    div.overflow1 {overflow:auto; height:100px; width:200px; border: 1px solid cyan;}
+    div.overflow2 {overflow:hidden; height:80px; width:150px; border: 1px solid cyan;}
+    div:focus { outline: 2px solid red;}
+    </style>
+</head>
+
+<body>
+<div class="overflow1">
+<div><a href="#" id="start"><img src="resources/green.png" width=40px; height=40px;></a></div>
+<div><a href="#" id="f2"><img src="resources/green.png" width=50px; height=40px;></a></div>
+<div><a href="#" id="f3"><img src="resources/green.png" width=40px; height=40px;></a></div>
+<br>
+<div><a href="#" id="f4"><img src="resources/green.png" width=50px; height=40px;></a></div>
+<div class="overflow2">
+<div><a href="#" id="f5"><img src="resources/green.png" width=40px; height=40px;></a></div>
+<div><a href="#" id="f6"><img src="resources/green.png" width=50px; height=40px;></a></div>
+<br>
+<div><a href="#" id="f7"><img src="resources/green.png" width=40px; height=40px;></a></div>
+<div><a href="#" id="f8"><img src="resources/green.png" width=50px; height=40px;></a></div>
+</div><br>
+<div><a href="#" id="f9"><img src="resources/green.png" width=40px; height=40px;></a></div>
+</div></div>
+<div id="console"></div>
+This test is testing that div with overflow:auto would scroll, by div with overflow:hidden would not.
+</body>
+</html>
+
diff --git a/LayoutTests/fast/events/spatial-navigation/snav-div-scrollable-but-without-focusable-content-expected.txt b/LayoutTests/fast/spatial-navigation/snav-div-scrollable-but-without-focusable-content-expected.txt
similarity index 100%
rename from LayoutTests/fast/events/spatial-navigation/snav-div-scrollable-but-without-focusable-content-expected.txt
rename to LayoutTests/fast/spatial-navigation/snav-div-scrollable-but-without-focusable-content-expected.txt
diff --git a/LayoutTests/fast/spatial-navigation/snav-div-scrollable-but-without-focusable-content.html b/LayoutTests/fast/spatial-navigation/snav-div-scrollable-but-without-focusable-content.html
new file mode 100644
index 0000000..de9bdf5
--- /dev/null
+++ b/LayoutTests/fast/spatial-navigation/snav-div-scrollable-but-without-focusable-content.html
@@ -0,0 +1,86 @@
+<html>
+  <!--
+    This test ensures the correctness of a basic aspect of spatial navigation traversal
+    routines: scrollable block html elements without any focusable content should be ignored.
+
+    * Pre-conditions:
+    1) DRT support for spatial navigation enable/disable.
+
+    * Navigation steps:
+    1) Loads this page, focus goes to "start" automatically.
+    2) Focus moves from "start" to "end" bypassing the two div's
+       in between them, once both have no focusable elements inside.
+  -->
+  <head>
+    <style type="text/css">
+      div.scroll {
+        height: 200px;
+        width: 300px;
+        overflow: auto;
+        border: 1px solid #666;
+        background-color: #ccc;
+        padding: 8px;
+      }
+    </style>
+
+    <script src="../js/resources/js-test-pre.js"></script>
+    <script src="resources/spatial-navigation-utils.js"></script>
+    <script type="application/javascript">
+
+    var resultMap = [
+      ["Down", "start"],
+      ["Down", "start"],
+      ["Down", "start"],
+      ["Down", "start"],
+      ["Down", "start"],
+      ["Down", "start"],
+      ["Down", "end"],
+      ["Up"  , "end"],
+      ["Up"  , "end"],
+      ["Up"  , "end"],
+      ["Up"  , "end"],
+      ["Up"  , "end"],
+      ["Up"  , "end"],
+      ["Up"  , "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();
+
+      initTest(resultMap, testCompleted);
+    }
+
+    function testCompleted()
+    {
+      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">
+    <div><a id="start" href="a"><img src="resources/green.png" width=30 height=30></a></div>
+    <div class="scroll">
+      <img src="resources/green.png" width=240 height=300>
+    </div>
+
+    <div class="scroll">
+      <img src="resources/green.png" width=240 height=300>
+    </div>
+    <div><a id="end" href="a"><img src="resources/green.png" width=30 height=30></a></div>
+    <div id="console"></div>
+    This test is to test that a scrollable div can scroll and reveal its content even if it does not have any focusable content.
+  </body>
+</html>
diff --git a/LayoutTests/fast/events/spatial-navigation/snav-fully-aligned-horizontally-expected.txt b/LayoutTests/fast/spatial-navigation/snav-fully-aligned-horizontally-expected.txt
similarity index 100%
rename from LayoutTests/fast/events/spatial-navigation/snav-fully-aligned-horizontally-expected.txt
rename to LayoutTests/fast/spatial-navigation/snav-fully-aligned-horizontally-expected.txt
diff --git a/LayoutTests/fast/spatial-navigation/snav-fully-aligned-horizontally.html b/LayoutTests/fast/spatial-navigation/snav-fully-aligned-horizontally.html
new file mode 100644
index 0000000..3c732d1
--- /dev/null
+++ b/LayoutTests/fast/spatial-navigation/snav-fully-aligned-horizontally.html
@@ -0,0 +1,99 @@
+<html>
+  <!--
+    This test ensures the correctness of the "Fully aligned" precedence
+    logic implemented by Spatial Navigation algorithm in an horizontal direction:
+    targets whose middle falls between the top and bottom of the current focused
+    element are preferably to move focus to, even if it is not the shortest distance.
+
+    * Pre-conditions:
+    1) DRT support for SNav enable/disable.
+
+    * Navigation steps:
+    1) Loads this page, focus goes to "start" automatically.
+    2) Focus moves preferably to elements right up or above the
+       current focused element, even when there are some other closer
+       but not vertically aligned elements in the same direction.
+  -->
+  <head>
+    <script src="../js/resources/js-test-pre.js"></script>
+    <script src="resources/spatial-navigation-utils.js"></script>
+    <script type="application/javascript">
+
+    var resultMap = [
+      ["Down", "1"],
+      ["Right", "2"],
+      ["Down", "4"],
+      ["Left", "3"],
+      ["Down", "5"],
+      ["Right", "6"],
+      ["Down", "8"],
+      ["Left", "7"],
+      ["Down", "9"],
+      ["Right", "10"],
+      ["Down", "12"],
+      ["Left", "11"],
+      ["Down", "13"],
+      ["Right", "14"],
+      ["Down", "16"],
+      ["Left", "15"],
+      ["Down", "17"],
+      ["Right", "18"],
+      ["Down", "20"],
+      ["Left", "19"],
+      ["Down", "21"],
+      ["Right", "22"],
+      ["Down", "24"],
+      ["Left", "23"],
+      ["Down", "25"],
+      ["Right", "26"],
+      ["Down", "27"],
+      ["Down", "end"],
+      ["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();
+
+      initTest(resultMap, testCompleted);
+    }
+
+    function testCompleted()
+    {
+      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">test<br></a>
+    <a id="1" href="a">H</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;<a id="2" href="p">ow Now Brown Cow</a><br>
+    <a id="3" href="a">Ho</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&nbsp;&nbsp; <a id="4" href="p">w Now Brown Cow</a><br>
+    <a id="5" href="a">How</a> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a id="6" href="p">Now Brown Cow</a><br>
+    <a id="7" href="a">How N</a> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <a id="8" href="p">ow Brown Cow</a><br>
+    <a id="9" href="a">How No</a> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <a id="10" href="p">w Brown Cow</a><br>
+    <a id="11" href="a">How Now </a>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <a id="12" href="p">Brown Cow</a><br>
+    <a id="13" href="a">How Now B</a> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <a id="14" href="p">rown Cow</a><br>
+    <a id="15" href="a">How Now Br</a> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <a id="16" href="p">own Cow</a><br>
+    <a id="17" href="a">How Now Bro</a> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <a id="18" href="p">wn Cow</a><br>
+    <a id="19" href="a">How Now Brow</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a id="20" href="p">n Cow</a><br>
+    <a id="21" href="a">How Now Brown</a> &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&nbsp; <a id="22" href="p">Cow</a><br>
+    <a id="23" href="a">How Now Brown C</a> &nbsp; &nbsp;&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <a id="24" href="p">ow</a><br>
+    <a id="25" href="a">How Now Brown Co</a> &nbsp;&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <a id="26" href="p">w</a><br>
+    <a id="27" href="a">How Now Brown Cow</a><br><br>
+    <a id="end" href="a">test<br></a>
+    <div id="console"></div>
+  </body>
+</html>
+
diff --git a/LayoutTests/fast/events/spatial-navigation/snav-fully-aligned-vertically-expected.txt b/LayoutTests/fast/spatial-navigation/snav-fully-aligned-vertically-expected.txt
similarity index 100%
rename from LayoutTests/fast/events/spatial-navigation/snav-fully-aligned-vertically-expected.txt
rename to LayoutTests/fast/spatial-navigation/snav-fully-aligned-vertically-expected.txt
diff --git a/LayoutTests/fast/spatial-navigation/snav-fully-aligned-vertically.html b/LayoutTests/fast/spatial-navigation/snav-fully-aligned-vertically.html
new file mode 100644
index 0000000..f8a35aa
--- /dev/null
+++ b/LayoutTests/fast/spatial-navigation/snav-fully-aligned-vertically.html
@@ -0,0 +1,82 @@
+<html>
+  <!--
+    This test ensures the correctness of the "Fully aligned" precedence
+    logic implemented by Spatial Navigation algorithm in an vertical direction:
+    targets whose middle falls between the top and bottom of the current focused
+    element are preferably to move focus to, even if it is not the shortest distance.
+
+    * Pre-conditions:
+    1) DRT support for SNav enable/disable.
+
+    * Navigation steps:
+    1) Loads this page, focus goes to "start" automatically.
+    2) Focus moves preferably to elements right up or above the
+       current focused element, even when there are some other closer
+       but not vertically aligned elements in the same direction.
+  -->
+  <head>
+    <script src="../js/resources/js-test-pre.js"></script>
+    <script src="resources/spatial-navigation-utils.js"></script>
+    <script type="application/javascript">
+
+    var resultMap = [
+      ["Down", "4"],
+      ["Down", "6"],
+      ["Down", "8"],
+      ["Down", "end"],
+      ["Up", "7"],
+      ["Up", "2"],
+      ["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();
+
+      initTest(resultMap, testCompleted);
+    }
+
+    function testCompleted()
+    {
+      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">
+    <div style="margin-left: 40px; text-align: left;">
+      <div style="margin-left: 40px;">
+        <a id="start" href="a">test<br></a>
+      </div>
+      <a id="2" href="a">test</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a id="3" href="a">test</a><br>
+      <div style="margin-left: 40px;">
+        <a id="4" href="a">test<br></a>
+      </div>
+      <div style="margin-left: 80px;">
+        <a id="5" href="a">test<br></a>
+      </div>
+      <div style="margin-left: 40px;">
+        <a id="6" href="a">test<br></a>
+      </div>
+      <a id="7" href="a">test<br></a>
+      <br><br><br><br>
+      <div style="margin-left: 40px;">
+        <a id="8" href="a">test<br></a>
+      </div>
+      <a id="end" href="a">test<br></a>
+    </div>
+    <div id="console"></div>
+  </body>
+</html>
+
diff --git a/LayoutTests/fast/events/spatial-navigation/snav-iframe-flattening-simple-expected.txt b/LayoutTests/fast/spatial-navigation/snav-iframe-flattening-simple-expected.txt
similarity index 100%
rename from LayoutTests/fast/events/spatial-navigation/snav-iframe-flattening-simple-expected.txt
rename to LayoutTests/fast/spatial-navigation/snav-iframe-flattening-simple-expected.txt
diff --git a/LayoutTests/fast/spatial-navigation/snav-iframe-flattening-simple.html b/LayoutTests/fast/spatial-navigation/snav-iframe-flattening-simple.html
new file mode 100644
index 0000000..95365b7
--- /dev/null
+++ b/LayoutTests/fast/spatial-navigation/snav-iframe-flattening-simple.html
@@ -0,0 +1,74 @@
+<html>
+  <!--
+    This test ensures the cross iframe traversal correctness of Spatial Navigation
+    algorithm: focusable elements in an flattened <iframe> should be accessible.
+
+    * Pre-conditions:
+    1) DRT support for Spatial Navigation enable/disable.
+    2) DRT support for Frame flattening enable/disable.
+
+    * Navigation steps:
+    1) Loads this page, focus goes to "start" automatically.
+    2) Focus moves along the elements in the two iframes in the
+       Web page, eventually going to outer an southward link, but
+       going back to the iframe on the top later on.
+  -->
+  <head>
+    <script src="../js/resources/js-test-pre.js"></script>
+    <script src="resources/spatial-navigation-utils.js"></script>
+    <script type="application/javascript">
+
+    var resultMap = [
+      ["Down", "1"],
+      ["Down", "2"],
+      ["Down", "end"],
+      ["Up", "2"],
+      ["Up", "1"],
+      ["Up", "start"],
+      ["DONE", "DONE"]
+    ];
+
+    if (window.layoutTestController) {
+      layoutTestController.dumpAsText();
+      layoutTestController.setSpatialNavigationEnabled(true);
+      layoutTestController.overridePreference("WebKitTabToLinksPreferenceKey", 1);
+      layoutTestController.waitUntilDone();
+    }
+
+    function runTest()
+    {
+      if (window.layoutTestController)
+        layoutTestController.setFrameFlatteningEnabled(true);
+
+      // starting the test itself: get to a known place.
+      document.getElementById("start").focus();
+
+      initTest(resultMap, testCompleted);
+    }
+
+    function testCompleted()
+    {
+      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">
+    <div><a id="start" href="a">a</a></div>
+
+    <iframe width="80" height="80" scrolling="auto" src="data:text/html,
+      <body>
+        <a id='1' href='a'>b</a>
+        <div style='margin-top:120px'>
+          <a id='2' href='a'>d</a>
+        </div>
+      </body>
+    "></iframe><br>
+
+    <div><a id="end" href="a">e</a></div>
+    <div id="console"></div>
+  </body>
+</html>
diff --git a/LayoutTests/fast/events/spatial-navigation/snav-iframe-nested-expected.txt b/LayoutTests/fast/spatial-navigation/snav-iframe-nested-expected.txt
similarity index 100%
rename from LayoutTests/fast/events/spatial-navigation/snav-iframe-nested-expected.txt
rename to LayoutTests/fast/spatial-navigation/snav-iframe-nested-expected.txt
diff --git a/LayoutTests/fast/spatial-navigation/snav-iframe-nested.html b/LayoutTests/fast/spatial-navigation/snav-iframe-nested.html
new file mode 100644
index 0000000..df3724d
--- /dev/null
+++ b/LayoutTests/fast/spatial-navigation/snav-iframe-nested.html
@@ -0,0 +1,93 @@
+<html>
+  <!--
+    This test ensures the cross iframe traversal correctness of spatial navigation:
+    focusable elements in nested inner frame should be accessible.
+
+    * Pre-conditions:
+    1) DRT support for spatial navigation enable/disable.
+
+    * Navigation steps:
+    1) Loads this page, focus goes to "start" automatically.
+    2) Focus moves along the elements in the two level deep nested frame,
+       but going back to the main frame later on.
+  -->
+  <head>
+    <script src="../js/resources/js-test-pre.js"></script>
+    <script src="resources/spatial-navigation-utils.js"></script>
+    <script type="application/javascript">
+
+    var resultMap = [
+      ["Right", "1"],
+      ["Right", "2"],
+      ["Right", "3"],
+      ["Right", "4"],
+      ["Right", "5"],
+      ["Right", "6"],
+      ["Right", "7"],
+      ["Right", "8"],
+      ["Right", "9"],
+      ["Left", "8"],
+      ["Left", "7"],
+      ["Left", "6"],
+      ["Left", "5"],
+      ["Left", "4"],
+      ["Left", "3"],
+      ["Left", "2"],
+      ["Left", "1"],
+      ["Left", "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();
+
+      initTest(resultMap, testCompleted);
+    }
+
+    function testCompleted()
+    {
+      if (window.layoutTestController)
+        layoutTestController.notifyDone();
+    }
+
+    window.onload = runTest;
+    </script>
+    <script src="js/resources/js-test-post.js"></script>
+  </head>
+  <body>
+  <table style="text-align: top;"  border="0" cellpadding="3px" cellspacing="3px">
+    <tr>
+      <td valign="top" width="10%">
+        <a id="start" href="#">Link</a><br>
+      </td>
+      <td valign="top">
+        <iframe width="50%" height="100px" frameborder="1" src="resources/iframe.html"></iframe><br>
+      </td>
+      <td valign="top" width="10%">
+        <a id="9" href="#">Link</a><br>
+      </td>
+    </tr>
+    <tr>
+      <td valign="top" width="10%">
+        <a id="10" href="#">Link</a><br>
+      </td>
+      <td valign="top">
+          <p><a id="11" href="#">Here</a> is a link.</p>
+      </td>
+      <td valign="top" width="10%">
+        <a id="12" href="#">Link</a><br>
+      </td>
+    </tr>
+  </table>
+  <div id="console"></div>
+  </body>
+</html>
diff --git a/LayoutTests/fast/events/spatial-navigation/snav-iframe-no-focusable-content-expected.txt b/LayoutTests/fast/spatial-navigation/snav-iframe-no-focusable-content-expected.txt
similarity index 100%
rename from LayoutTests/fast/events/spatial-navigation/snav-iframe-no-focusable-content-expected.txt
rename to LayoutTests/fast/spatial-navigation/snav-iframe-no-focusable-content-expected.txt
diff --git a/LayoutTests/fast/spatial-navigation/snav-iframe-no-focusable-content.html b/LayoutTests/fast/spatial-navigation/snav-iframe-no-focusable-content.html
new file mode 100644
index 0000000..c7f89b1
--- /dev/null
+++ b/LayoutTests/fast/spatial-navigation/snav-iframe-no-focusable-content.html
@@ -0,0 +1,81 @@
+<html>
+  <!--
+    This test ensures the basic traversal correctness of Spatial Navigation
+    algorithm: iframes without any focusable content should be ignored.
+
+    * Pre-conditions:
+    1) DRT support for SNav enable/disable.
+
+    * Navigation steps:
+    1) Loads this page, focus goes to "start" automatically.
+    2) Focus moves from "start" to "end" bypassing the two iframes
+       in between them, once both have no focusable elements inside.
+  -->
+  <head>
+    <script src="../js/resources/js-test-pre.js"></script>
+    <script src="resources/spatial-navigation-utils.js"></script>
+    <script type="application/javascript">
+
+    var resultMap = [
+      ["Down", "start"],
+      ["Down", "start"],
+      ["Down", "start"],
+      ["Down", "start"],
+      ["Down", "start"],
+      ["Down", "start"],
+      ["Down", "end"],
+      ["Up"  , "end"],
+      ["Up"  , "end"],
+      ["Up"  , "end"],
+      ["Up"  , "end"],
+      ["Up"  , "end"],
+      ["Up"  , "end"],
+      ["Up"  , "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();
+
+      initTest(resultMap, testCompleted);
+    }
+
+    function testCompleted()
+    {
+      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">
+    <div><a id="start" href="a">a</a></div>
+
+    <iframe width="80" height="80" scrolling="auto" src="data:text/html,
+      <body>
+        <img width=120 height=200 src='resources/green.png'>
+      </body>
+    "></iframe><br>
+
+    <iframe scrolling="auto" src="data:text/html,
+      <body>
+        <img width=120 height=200 src='resources/green.png'>
+      </body>
+    "></iframe><br>
+
+    <a id="end" href="a">e</a>
+    <div id="console"></div>
+    This is to test that an iframe with no focusable content still scrolls
+  </body>
+</html>
diff --git a/LayoutTests/fast/events/spatial-navigation/snav-iframe-no-scrollable-content-expected.txt b/LayoutTests/fast/spatial-navigation/snav-iframe-no-scrollable-content-expected.txt
similarity index 100%
rename from LayoutTests/fast/events/spatial-navigation/snav-iframe-no-scrollable-content-expected.txt
rename to LayoutTests/fast/spatial-navigation/snav-iframe-no-scrollable-content-expected.txt
diff --git a/LayoutTests/fast/spatial-navigation/snav-iframe-no-scrollable-content.html b/LayoutTests/fast/spatial-navigation/snav-iframe-no-scrollable-content.html
new file mode 100644
index 0000000..f97b234
--- /dev/null
+++ b/LayoutTests/fast/spatial-navigation/snav-iframe-no-scrollable-content.html
@@ -0,0 +1,88 @@
+<html>
+  <!--
+    This test ensures the basic iframe traversal correctness of Spatial Navigation
+    algorithm: focusable elements in a <iframe> should be accessible.
+
+    * Pre-conditions:
+    1) DRT support for SNav enable/disable.
+
+    * Navigation steps:
+    1) Loads this page, focus goes to "start" automatically.
+    2) Focus moves along the elements in the two iframes in the
+       Web page, eventually going to outer an southward link, but
+       going back to the iframe on the top later on.
+  -->
+  <head>
+    <script src="../js/resources/js-test-pre.js"></script>
+    <script src="resources/spatial-navigation-utils.js"></script>
+    <script type="application/javascript">
+
+    var resultMap = [
+      ["Down", "1"],
+      ["Down", "2"],
+      ["Down", "3"],
+      ["Down", "7"],
+      ["Down", "6"],
+      ["Down", "end"],
+      ["Up", "4"],
+      ["Right", "5"],
+      ["Right", "6"],
+      ["Up", "3"],
+      ["Right", "7"],
+      ["Up", "3"],
+      ["Up", "2"],
+      ["Up", "1"],
+      ["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();
+
+      initTest(resultMap, testCompleted);
+    }
+
+    function testCompleted()
+    {
+      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">
+    <div><a id="start" href="a">a</a></div>
+
+    <iframe src="data:text/html,
+      <body>
+        <a id='1' href='a'>b</a><br>
+        <a id='2' href='a'>c</a><br>
+        <a id='3' href='a'>d</a><br>
+        <div style='margin-left:80px'>
+          <a id='7' href='a'>e</a>
+        </div>
+      </body>
+    "></iframe><br>
+
+    <iframe src="data:text/html,
+      <body>
+        <a id='4' href='a'>g</a>
+        <a id='5' href='a'>h</a>
+        <a id='6' href='a'>i</a>
+      </body>
+    "></iframe><br>
+
+    <a id="end" href="a">a</a>
+    <div id="console"></div>
+  </body>
+</html>
diff --git a/LayoutTests/fast/events/spatial-navigation/snav-iframe-recursive-offset-parent-expected.txt b/LayoutTests/fast/spatial-navigation/snav-iframe-recursive-offset-parent-expected.txt
similarity index 100%
rename from LayoutTests/fast/events/spatial-navigation/snav-iframe-recursive-offset-parent-expected.txt
rename to LayoutTests/fast/spatial-navigation/snav-iframe-recursive-offset-parent-expected.txt
diff --git a/LayoutTests/fast/spatial-navigation/snav-iframe-recursive-offset-parent.html b/LayoutTests/fast/spatial-navigation/snav-iframe-recursive-offset-parent.html
new file mode 100644
index 0000000..5dd7754
--- /dev/null
+++ b/LayoutTests/fast/spatial-navigation/snav-iframe-recursive-offset-parent.html
@@ -0,0 +1,75 @@
+<html>
+  <!--
+    This test ensures the cross iframe traversal correctness of Spatial Navigation
+    algorithm: focusable elements in an <iframe> should be accessible even when
+    the current focused element is in another <iframe> in the same page.
+
+    * Pre-conditions:
+    1) DRT support for SNav enable/disable.
+
+    * Navigation steps:
+    1) Loads this page, focus goes to "start" automatically.
+    2) Focus moves along the elements in the two iframes in the
+       Web page, eventually going to outer an southward link, but
+       going back to the iframe on the top later on.
+  -->
+  <head>
+    <script src="../js/resources/js-test-pre.js"></script>
+    <script src="resources/spatial-navigation-utils.js"></script>
+    <script type="application/javascript">
+
+    var resultMap = [
+      ["Right", "1"],
+      ["Right", "2"],
+      ["Right", "3"],
+      ["Left", "2"],
+      ["Left", "1"],
+      ["Left", "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();
+
+      initTest(resultMap, testCompleted);
+    }
+
+    function testCompleted()
+    {
+      if (window.layoutTestController)
+        layoutTestController.notifyDone();
+    }
+
+    window.onload = runTest;
+    </script>
+    <script src="js/resources/js-test-post.js"></script>
+  </head>
+  <body>
+  <table style="text-align: top;"  border="0" cellpadding="3px" cellspacing="3px">
+    <tr>
+      <td valign="top" width="10%">
+        <a id="start" href="http://google.com">Link</a><br>
+      </td>
+      <td valign="top">
+        <iframe width="50%" height="100px" frameborder="1" src="data:text/html,
+        <body>
+          <a id='1' href='http://a'>b</a>
+          <a id='2' href='http://a'>c</a>
+          <a id='3' href='http://a'>d</a>
+        </body>
+        "></iframe><br>
+      </td>
+    </tr>
+  </table>
+  <div id="console"></div>
+  </body>
+</html>
diff --git a/LayoutTests/fast/events/spatial-navigation/snav-iframe-with-offscreen-focusable-element-expected.txt b/LayoutTests/fast/spatial-navigation/snav-iframe-with-offscreen-focusable-element-expected.txt
similarity index 100%
rename from LayoutTests/fast/events/spatial-navigation/snav-iframe-with-offscreen-focusable-element-expected.txt
rename to LayoutTests/fast/spatial-navigation/snav-iframe-with-offscreen-focusable-element-expected.txt
diff --git a/LayoutTests/fast/spatial-navigation/snav-iframe-with-offscreen-focusable-element.html b/LayoutTests/fast/spatial-navigation/snav-iframe-with-offscreen-focusable-element.html
new file mode 100644
index 0000000..6eaa19e
--- /dev/null
+++ b/LayoutTests/fast/spatial-navigation/snav-iframe-with-offscreen-focusable-element.html
@@ -0,0 +1,84 @@
+<html>
+  <!--
+    This test ensures the cross iframe traversal correctness of Spatial Navigation
+    algorithm: focusable elements in an <iframe> should be accessible even when
+    the current focused element is in another <iframe> in the same page.
+
+    * Pre-conditions:
+    1) DRT support for SNav enable/disable.
+
+    * Navigation steps:
+    1) Loads this page, focus goes to "start" automatically.
+    2) Focus moves along the elements in the two iframes in the
+       Web page, eventually going to outer an southward link, but
+       going back to the iframe on the top later on.
+  -->
+  <head>
+    <script src="../js/resources/js-test-pre.js"></script>
+    <script src="resources/spatial-navigation-utils.js"></script>
+    <script type="application/javascript">
+
+    var resultMap = [
+      ["Down", "1"],
+      ["Down", "1"],
+      ["Down", "1"],
+      ["Down", "1"],
+      ["Down", "1"],
+      ["Down", "1"],
+      ["Down", "1"],
+      ["Down", "2"],
+      ["Down", "end"],
+      ["Up", "2"],
+      ["Up", "2"],
+      ["Up", "2"],
+      ["Up", "2"],
+      ["Up", "2"],
+      ["Up", "2"],
+      ["Up", "2"],
+      ["Up", "1"],
+      ["Up", "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();
+
+      initTest(resultMap, testCompleted);
+    }
+
+    function testCompleted()
+    {
+      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">
+    <div><a id="start" href="a"><img src="resources/green.png" width=30 height=30></a></div>
+
+    <iframe width="80" height="80" scrolling="auto" src="data:text/html,
+      <body>
+        <a id='1' href='a'><img src='no_image' width=30 height=30></a>
+        <div>
+          <img src='no_image' width=50 height=300>
+          <a id='2' href='a'><img src='no_image' width=30 height=30></a>
+        </div>
+      </body>
+    "></iframe><br>
+
+    <div><a id="end" href="a"><img src="resources/green.png" width=30 height=30></a></div>
+    <div id="console"></div>
+  </body>
+</html>
diff --git a/LayoutTests/fast/events/spatial-navigation/snav-input-expected.txt b/LayoutTests/fast/spatial-navigation/snav-input-expected.txt
similarity index 100%
rename from LayoutTests/fast/events/spatial-navigation/snav-input-expected.txt
rename to LayoutTests/fast/spatial-navigation/snav-input-expected.txt
diff --git a/LayoutTests/fast/spatial-navigation/snav-input.html b/LayoutTests/fast/spatial-navigation/snav-input.html
new file mode 100644
index 0000000..d7e0ce1
--- /dev/null
+++ b/LayoutTests/fast/spatial-navigation/snav-input.html
@@ -0,0 +1,78 @@
+<!DOCTYPE html>
+  <head>
+    <script src="../js/resources/js-test-pre.js"></script>
+    <script src="resources/spatial-navigation-utils.js"></script>
+    <script src="js/resources/js-test-post.js"></script>
+  </head>
+  <body id="some-content" xmlns="http://www.w3.org/1999/xhtml">
+    <p id="description"></p>
+    <table style="text-align: left; width: 100%; margin-left: auto; margin-right: auto;" border="1" cellpadding="2" cellspacing="1">
+      <tbody>
+        <tr>
+          <td style="vertical-align: top; text-align: center;"></td>
+          <td style="vertical-align: top; text-align: center;"><a id="2" href="a">2</a></td>
+          <td style="vertical-align: top; text-align: center;"></td>
+        </tr>
+        <tr>
+          <td style="vertical-align: top; text-align: center;"><a id="4" href="a">4</a></td>
+          <td style="vertical-align: top; text-align: center;"><input id="start" type="text" value="text"></td>
+          <td style="vertical-align: top; text-align: center;"><a id="6" href="a">6</a></td>
+        </tr>
+        <tr>
+          <td style="vertical-align: top; text-align: center;"></td>
+          <td style="vertical-align: top; text-align: center;"><a id="8" href="a">8</a></td>
+          <td style="vertical-align: top; text-align: center;"></td>
+        </tr>
+      </tbody>
+    </table>
+    <div id="console"></div>
+    <script type="application/javascript">
+    description('This test ensures the correctness of Spatial Navigation (SNav) algorithm over input box.<br>\
+                * Pre-conditions:<br>\
+                1) DRT support for SNav enable/disable.<br>\
+                * Navigation steps:<br>\
+                1) Loads this page, focus goes to "start" automatically.<br>\
+                2) Focus moves away from input box in 4 different directions to neighbor nodes and back.<br>');
+
+    var resultMap = [
+      ["Down", "start"],
+      ["Down", "8"],
+      ["Up", "start"],
+      ["Up", "start"],
+      ["Up", "2"],
+      ["Down", "start"],
+      ["Right", "start"],
+      ["Right", "6"],
+      ["Left", "start"],
+      ["Left", "start"],
+      ["Left", "4"],
+      ["Right", "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();
+
+      initTest(resultMap, testCompleted);
+    }
+
+    function testCompleted()
+    {
+      if (window.layoutTestController)
+        layoutTestController.notifyDone();
+    }
+
+    window.onload = runTest;
+
+    </script>
+  </body>
+</html>
diff --git a/LayoutTests/fast/events/spatial-navigation/snav-multiple-select-expected.txt b/LayoutTests/fast/spatial-navigation/snav-multiple-select-expected.txt
similarity index 100%
rename from LayoutTests/fast/events/spatial-navigation/snav-multiple-select-expected.txt
rename to LayoutTests/fast/spatial-navigation/snav-multiple-select-expected.txt
diff --git a/LayoutTests/fast/spatial-navigation/snav-multiple-select.html b/LayoutTests/fast/spatial-navigation/snav-multiple-select.html
new file mode 100644
index 0000000..9383d64
--- /dev/null
+++ b/LayoutTests/fast/spatial-navigation/snav-multiple-select.html
@@ -0,0 +1,83 @@
+<html>
+  <!--
+    This test ensures the correctness of Spatial Navigation (SNav) algorithm over single select element.
+
+    * Pre-conditions:
+    1) DRT support for SNav enable/disable.
+
+    * Navigation steps:
+    1) Loads this page, focus goes to "start" automatically.
+    2) Focus moves away from select in 4 different directions to neighbor nodes and back.
+  -->
+  <head>
+    <script src="../js/resources/js-test-pre.js"></script>
+    <script src="resources/spatial-navigation-utils.js"></script>
+    <script type="application/javascript">
+
+    var resultMap = [
+      ["Down", "start"],
+      ["Down", "start"],
+      ["Down", "start"],
+      ["Down", "8"],
+      ["Up", "start"],
+      ["Up", "start"],
+      ["Up", "start"],
+      ["Up", "2"],
+      ["Down", "start"],
+      ["Right", "6"],
+      ["Left", "start"],
+      ["Left", "4"],
+      ["Right", "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();
+
+      initTest(resultMap, testCompleted);
+    }
+
+    function testCompleted()
+    {
+      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">
+    <table style="text-align: left; width: 100%; margin-left: auto; margin-right: auto;" border="1" cellpadding="2" cellspacing="1">
+      <tbody>
+        <tr>
+          <td style="vertical-align: top; text-align: center;"></td>
+          <td style="vertical-align: top; text-align: center;"><a id="2" href="a">2</a></td>
+          <td style="vertical-align: top; text-align: center;"></td>
+        </tr>
+        <tr>
+          <td style="vertical-align: top; text-align: center;"><a id="4" href="a">4</a></td>
+          <td style="vertical-align: top; text-align: center;"><select id="start" multiple><option>1</option><option>2</option><option>3</option></select></td>
+          <td style="vertical-align: top; text-align: center;"><a id="6" href="a">6</a></td>
+        </tr>
+        <tr>
+          <td style="vertical-align: top; text-align: center;"></td>
+          <td style="vertical-align: top; text-align: center;"><a id="8" href="a">8</a></td>
+          <td style="vertical-align: top; text-align: center;"></td>
+        </tr>
+      </tbody>
+    </table>
+    <div id="console"></div>
+  </body>
+</html>
+
diff --git a/LayoutTests/fast/events/spatial-navigation/snav-offscreen-content-expected.txt b/LayoutTests/fast/spatial-navigation/snav-offscreen-content-expected.txt
similarity index 100%
rename from LayoutTests/fast/events/spatial-navigation/snav-offscreen-content-expected.txt
rename to LayoutTests/fast/spatial-navigation/snav-offscreen-content-expected.txt
diff --git a/LayoutTests/fast/spatial-navigation/snav-offscreen-content.html b/LayoutTests/fast/spatial-navigation/snav-offscreen-content.html
new file mode 100644
index 0000000..5eb048a
--- /dev/null
+++ b/LayoutTests/fast/spatial-navigation/snav-offscreen-content.html
@@ -0,0 +1,74 @@
+<html>
+  <!--
+    This test ensures the content overflow traversal correctness of Spatial Navigation
+    algorithm: focusable elements in an scrollable containers (e.g. <div>) should be
+    accessible, including offscreen content.
+
+    * Pre-conditions:
+    1) DRT support for SNav enable/disable.
+
+    * Navigation steps:
+    1) Loads this page, focus goes to "start" automatically.
+    2) Move focus down to the visible focusable element in
+       scrollable div.
+    3) Traverse the page through other focusable elements down the page.
+       and then back up.
+
+    * Expected results: All focusable element in scrollable content, including
+    offscreen ones, should be accessible via SNav. -->
+  <head>
+    <style type="text/css">
+      .offscreen {
+        position: absolute;
+        left: -1000em;
+      }
+    </style>
+
+    <script src="../js/resources/js-test-pre.js"></script>
+    <script src="resources/spatial-navigation-utils.js"></script>
+    <script type="application/javascript">
+
+    var resultMap = [
+      ["Left", "1"],
+      ["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();
+
+      initTest(resultMap, testCompleted);
+    }
+
+    function testCompleted()
+    {
+      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">
+
+    <div style="margin-left:120px">
+      <a id="off" class="offscreen" href="a">offscreen content</a>
+      <a id="start" href="a">Right link</a>
+    </div><br>
+    <a id="1" href="a">Down link</a><br>
+    <div id="console"></div>
+  </body>
+</html>
+
diff --git a/LayoutTests/fast/events/spatial-navigation/snav-only-clipped-overflow-content-expected.txt b/LayoutTests/fast/spatial-navigation/snav-only-clipped-overflow-content-expected.txt
similarity index 100%
rename from LayoutTests/fast/events/spatial-navigation/snav-only-clipped-overflow-content-expected.txt
rename to LayoutTests/fast/spatial-navigation/snav-only-clipped-overflow-content-expected.txt
diff --git a/LayoutTests/fast/spatial-navigation/snav-only-clipped-overflow-content.html b/LayoutTests/fast/spatial-navigation/snav-only-clipped-overflow-content.html
new file mode 100644
index 0000000..a5dfde7
--- /dev/null
+++ b/LayoutTests/fast/spatial-navigation/snav-only-clipped-overflow-content.html
@@ -0,0 +1,77 @@
+<html>
+  <!--
+    This test ensures the content overflow traversal correctness of spatial navigation:
+    if an element if clipped overflow in a scrollable container (e.g. <div>),
+    scroll-in-direction should happen in the container box, not on the outer view.
+
+    * Pre-conditions:
+    1) DRT support for spatial navigation enable/disable.
+
+    * Navigation steps:
+    1) Loads this page, focus goes to "start" automatically.
+    2) Try to move focus down to the visible focusable element in
+       scrollable div.
+
+    * Expected results: There should have to a scroll action in the container
+    (div) as an attempt to make the clipped overflow node visible and accessible
+    via spatial navigation. -->
+  <head>
+    <style type="text/css">
+      div.scroll {
+        height: 200px;
+        width: 300px;
+        overflow: auto;
+        border: 1px solid #666;
+        background-color: #ccc;
+        padding: 8px;
+      }
+    </style>
+
+    <script src="../js/resources/js-test-pre.js"></script>
+    <script src="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();
+
+      initTest(resultMap, testCompleted);
+    }
+
+    function testCompleted()
+    {
+      shouldBeTrue(String(document.getElementById("div").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">
+    <p>That is is a normal <a id="start" href="a">link</a>.</p>
+    <div class="scroll" id="div">
+      <p>This is a scrollable Div created with the CSS property overflow.</p>
+      <br><br><br><br><br><br><br><br>
+      <p> ... and here we have a clipped overflow <a id="1" href="a">link</a>.</p>
+    </div>
+    <p>And this is another normal <a id="2" href="a">link_2</a>.</p>
+    <div id="console"></div>
+  </body>
+</html>
diff --git a/LayoutTests/fast/events/spatial-navigation/snav-radio-expected.txt b/LayoutTests/fast/spatial-navigation/snav-radio-expected.txt
similarity index 100%
rename from LayoutTests/fast/events/spatial-navigation/snav-radio-expected.txt
rename to LayoutTests/fast/spatial-navigation/snav-radio-expected.txt
diff --git a/LayoutTests/fast/events/spatial-navigation/snav-radio-group-expected.txt b/LayoutTests/fast/spatial-navigation/snav-radio-group-expected.txt
similarity index 100%
rename from LayoutTests/fast/events/spatial-navigation/snav-radio-group-expected.txt
rename to LayoutTests/fast/spatial-navigation/snav-radio-group-expected.txt
diff --git a/LayoutTests/fast/spatial-navigation/snav-radio-group.html b/LayoutTests/fast/spatial-navigation/snav-radio-group.html
new file mode 100644
index 0000000..4c1db09
--- /dev/null
+++ b/LayoutTests/fast/spatial-navigation/snav-radio-group.html
@@ -0,0 +1,109 @@
+<html>
+  <!--
+    This test ensures the correctness of Spatial Navigation (SNav) algorithm over single select element.
+
+    * Pre-conditions:
+    1) DRT support for SNav enable/disable.
+
+    * Navigation steps:
+    1) Loads this page, focus goes to "start" automatically.
+    2) Focus moves away from select in 4 different directions to neighbor nodes and back.
+  -->
+  <head>
+    <script src="../js/resources/js-test-pre.js"></script>
+    <script src="resources/spatial-navigation-utils.js"></script>
+    <script type="application/javascript">
+
+    var resultMap = [
+      ["Down", "down"],
+      ["Down", "8"],
+      ["Up", "down"],
+      ["Up", "start"],
+      ["Up", "up"],
+      ["Up", "2"],
+      ["Down", "up"],
+      ["Down", "start"],
+      ["Right", "right"],
+      ["Right", "6"],
+      ["Left", "right"],
+      ["Left", "start"],
+      ["Left", "left"],
+      ["Left", "4"],
+      ["Right", "left"],
+      ["Right", "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();
+
+      initTest(resultMap, testCompleted);
+    }
+
+    function testCompleted()
+    {
+      if (window.layoutTestController)
+        shouldBe("document.getElementById('down').checked", "true");            
+        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">
+    <table style="text-align: left; width: 100%; margin-left: auto; margin-right: auto;" border="1" cellpadding="2" cellspacing="1">
+      <tbody>
+        <tr>
+          <td style="vertical-align: center; text-align: center;"></td>
+          <td style="vertical-align: center; text-align: center;"><a id="2" href="a">2</a></td>
+          <td style="vertical-align: center; text-align: center;"></td>
+        </tr>
+        <tr>
+          <td style="vertical-align: center; text-align: center;"><a id="4" href="a">4</a></td>
+          <td style="vertical-align: center; text-align: center;">
+            <table style="text-align: center; width: 100%; margin-left: auto; margin-right: auto;" border="1" cellpadding="2" cellspacing="1">
+              <tbody>
+                <tr>
+                  <td style="vertical-align: center; text-align: center;"></td>
+                  <td style="vertical-align: center; text-align: center;"><input type="radio" name="group" id="up" ></td>
+                  <td style="vertical-align: center; text-align: center;"></td>
+                </tr>
+                <tr>
+                  <td style="vertical-align: center; text-align: center;"><input type="radio" name="group" id="left" ></td>
+                  <td style="vertical-align: center; text-align: center;">
+                    <input type="radio" name="group" id="start" >
+                  </td>
+                  <td style="vertical-align: center; text-align: center;"><input type="radio" name="group" id="right" ></td>
+                </tr>
+                <tr>
+                  <td style="vertical-align: center; text-align: center;"></td>
+                  <td style="vertical-align: center; text-align: center;"><input type="radio" name="group" id="down" checked ></td>
+                  <td style="vertical-align: center; text-align: center;"></td>
+                </tr>
+              </tbody>
+            </table>
+          </td>
+          <td style="vertical-align: center; text-align: center;"><a id="6" href="a">6</a></td>
+        </tr>
+        <tr>
+          <td style="vertical-align: center; text-align: center;"></td>
+          <td style="vertical-align: center; text-align: center;"><a id="8" href="a">8</a></td>
+          <td style="vertical-align: center; text-align: center;"></td>
+        </tr>
+      </tbody>
+    </table>
+    <div id="console"></div>
+  </body>
+</html>
+
diff --git a/LayoutTests/fast/spatial-navigation/snav-radio.html b/LayoutTests/fast/spatial-navigation/snav-radio.html
new file mode 100644
index 0000000..206cfb5
--- /dev/null
+++ b/LayoutTests/fast/spatial-navigation/snav-radio.html
@@ -0,0 +1,78 @@
+<html>
+  <!--
+    This test ensures the correctness of Spatial Navigation (SNav) algorithm over single select element.
+
+    * Pre-conditions:
+    1) DRT support for SNav enable/disable.
+
+    * Navigation steps:
+    1) Loads this page, focus goes to "start" automatically.
+    2) Focus moves away from select in 4 different directions to neighbor nodes and back.
+  -->
+  <head>
+    <script src="../js/resources/js-test-pre.js"></script>
+    <script src="resources/spatial-navigation-utils.js"></script>
+    <script type="application/javascript">
+
+    var resultMap = [
+      ["Down", "8"],
+      ["Up", "start"],
+      ["Up", "2"],
+      ["Down", "start"],
+      ["Right", "6"],
+      ["Left", "start"],
+      ["Left", "4"],
+      ["Right", "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();
+
+      initTest(resultMap, testCompleted);
+    }
+
+    function testCompleted()
+    {
+      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">
+    <table style="text-align: left; width: 100%; margin-left: auto; margin-right: auto;" border="1" cellpadding="2" cellspacing="1">
+      <tbody>
+        <tr>
+          <td style="vertical-align: top; text-align: center;"></td>
+          <td style="vertical-align: top; text-align: center;"><a id="2" href="a">2</a></td>
+          <td style="vertical-align: top; text-align: center;"></td>
+        </tr>
+        <tr>
+          <td style="vertical-align: top; text-align: center;"><a id="4" href="a">4</a></td>
+          <td style="vertical-align: top; text-align: center;"><input type="radio" id="start" ></td>
+          <td style="vertical-align: top; text-align: center;"><a id="6" href="a">6</a></td>
+        </tr>
+        <tr>
+          <td style="vertical-align: top; text-align: center;"></td>
+          <td style="vertical-align: top; text-align: center;"><a id="8" href="a">8</a></td>
+          <td style="vertical-align: top; text-align: center;"></td>
+        </tr>
+      </tbody>
+    </table>
+    <div id="console"></div>
+  </body>
+</html>
+
diff --git a/LayoutTests/fast/events/spatial-navigation/snav-simple-content-overflow-expected.txt b/LayoutTests/fast/spatial-navigation/snav-simple-content-overflow-expected.txt
similarity index 100%
rename from LayoutTests/fast/events/spatial-navigation/snav-simple-content-overflow-expected.txt
rename to LayoutTests/fast/spatial-navigation/snav-simple-content-overflow-expected.txt
diff --git a/LayoutTests/fast/spatial-navigation/snav-simple-content-overflow.html b/LayoutTests/fast/spatial-navigation/snav-simple-content-overflow.html
new file mode 100644
index 0000000..b3b126c
--- /dev/null
+++ b/LayoutTests/fast/spatial-navigation/snav-simple-content-overflow.html
@@ -0,0 +1,74 @@
+<html>
+  <!--
+    This test ensures that overflowed content can be focused by Spatial Navigation.
+
+    * Pre-conditions:
+    1) DRT support for SNav enable/disable.
+
+    * Navigation steps:
+    1) Loads this page, focus goes to "start" automatically.
+    3) Try to traverse the links on page down.
+       and then back up.
+
+    * Expected results: After 'start' gets the focus, tapping down arrow should scroll its
+      enclosing scrollable container (<div>) down, and *not* move focus to the link whose id is '2'.
+  -->
+  <head>
+    <style type="text/css">
+      div.scroll {
+        height: 200px;
+        width: 300px;
+        overflow: auto;
+        border: 1px solid #666;
+        background-color: #ccc;
+        padding: 8px;
+      }
+    </style>
+
+    <script src="../js/resources/js-test-pre.js"></script>
+    <script src="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();
+
+      initTest(resultMap, testCompleted);
+    }
+
+    function testCompleted()
+    {
+      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">
+    <div class="scroll">
+      <p>It has a visible <a id="start" href="a">link_1</a>.</p>
+      <br><br><br><br><br><br><br><br><br>
+      <p>... and an overflowed link like <a id="1" href="a">this</a>.</p>
+    </div>
+    <br><br><br><br><br><br><br>
+    <p>This link should NOT get <a id="start" href="a">focused</a>.</p>
+    <div id="console"></div>
+  </body>
+</html>
diff --git a/LayoutTests/fast/events/spatial-navigation/snav-single-select-expected.txt b/LayoutTests/fast/spatial-navigation/snav-single-select-expected.txt
similarity index 100%
rename from LayoutTests/fast/events/spatial-navigation/snav-single-select-expected.txt
rename to LayoutTests/fast/spatial-navigation/snav-single-select-expected.txt
diff --git a/LayoutTests/fast/spatial-navigation/snav-single-select.html b/LayoutTests/fast/spatial-navigation/snav-single-select.html
new file mode 100644
index 0000000..3ae8014
--- /dev/null
+++ b/LayoutTests/fast/spatial-navigation/snav-single-select.html
@@ -0,0 +1,96 @@
+<html>
+  <!--
+    This test ensures the correctness of Spatial Navigation (SNav) algorithm over single select element.
+
+    * Pre-conditions:
+    1) DRT support for SNav enable/disable.
+
+    * Navigation steps:
+    1) Loads this page, focus goes to "start" automatically.
+    2) Focus moves away from select in 4 different directions to neighbor nodes and back.
+  -->
+  <head>
+    <script src="../js/resources/js-test-pre.js"></script>
+    <script src="resources/spatial-navigation-utils.js"></script>
+    <script type="application/javascript">
+
+    var resultMap = [
+      ["Down", "8"],
+      ["Up", "start"],
+      ["Up", "2"],
+      ["Down", "start"],
+      ["Right", "6"],
+      ["Left", "start"],
+      ["Left", "4"],
+      ["Right", "start"],
+      ["Space", "start"],
+      ["Down", "start"],
+      ["Up", "start"],
+      ["Space", "start"],
+      ["Down", "8"],
+      ["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();
+
+      initTest(resultMap, additionalTest);
+    }
+
+    function additionalTest()
+    {
+      document.getElementById("start").focus();
+      shouldBe("gFocusedDocument.getElementById(\"start\").selectedIndex", "0");
+      eventSender.keyDown(" ");
+      eventSender.keyDown("downArrow");
+      shouldBe("gFocusedDocument.getElementById(\"start\").selectedIndex", "1");
+      eventSender.keyDown("upArrow");
+      shouldBe("gFocusedDocument.getElementById(\"start\").selectedIndex", "0");
+
+      testCompleted();
+    }
+
+    function testCompleted()
+    {
+      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">
+    <table style="text-align: left; width: 100%; margin-left: auto; margin-right: auto;" border="1" cellpadding="2" cellspacing="1">
+      <tbody>
+        <tr>
+          <td style="vertical-align: top; text-align: center;"></td>
+          <td style="vertical-align: top; text-align: center;"><a id="2" href="a">2</a></td>
+          <td style="vertical-align: top; text-align: center;"></td>
+        </tr>
+        <tr>
+          <td style="vertical-align: top; text-align: center;"><a id="4" href="a">4</a></td>
+          <td style="vertical-align: top; text-align: center;"><select id="start"><option>1</option><option>2</option><option>3</option></select></td>
+          <td style="vertical-align: top; text-align: center;"><a id="6" href="a">6</a></td>
+        </tr>
+        <tr>
+          <td style="vertical-align: top; text-align: center;"></td>
+          <td style="vertical-align: top; text-align: center;"><a id="8" href="a">8</a></td>
+          <td style="vertical-align: top; text-align: center;"></td>
+        </tr>
+      </tbody>
+    </table>
+    <div id="console"></div>
+  </body>
+</html>
+
diff --git a/LayoutTests/fast/events/spatial-navigation/snav-table-traversal-expected.txt b/LayoutTests/fast/spatial-navigation/snav-table-traversal-expected.txt
similarity index 100%
rename from LayoutTests/fast/events/spatial-navigation/snav-table-traversal-expected.txt
rename to LayoutTests/fast/spatial-navigation/snav-table-traversal-expected.txt
diff --git a/LayoutTests/fast/spatial-navigation/snav-table-traversal.html b/LayoutTests/fast/spatial-navigation/snav-table-traversal.html
new file mode 100644
index 0000000..2620ceb
--- /dev/null
+++ b/LayoutTests/fast/spatial-navigation/snav-table-traversal.html
@@ -0,0 +1,86 @@
+<html>
+  <!--
+    This test ensures the basic table traversal correctness of
+    Spatial Navigation (SNav) algorithm: focusable elements in a
+    <table> should be accessible.
+
+    * Pre-conditions:
+    1) DRT support for SNav enable/disable.
+
+    * Navigation steps:
+    1) Loads this page, focus goes to "start" automatically.
+    2) Focus moves along through the sparsely positioned elements
+       in the table, eventually going to an outer southward link,
+       but going back inside the table later on.
+  -->
+  <head>
+    <script src="../js/resources/js-test-pre.js"></script>
+    <script src="resources/spatial-navigation-utils.js"></script>
+    <script type="application/javascript">
+
+    var resultMap = [
+      ["Down", "4"],
+      ["Down", "7"],
+      ["Down", "end"],
+      ["Up", "7"],
+      ["Right", "8"],
+      ["Right", "9"],
+      ["Up", "6"],
+      ["Up", "3"],
+      ["Left", "2"],
+      ["Left", "1"],
+      ["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();
+
+      initTest(resultMap, testCompleted);
+    }
+
+    function testCompleted()
+    {
+      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">
+    <table style="text-align: left; width: 100%; margin-left: auto; margin-right: auto;" border="1" cellpadding="2" cellspacing="1">
+      <tbody>
+        <tr>
+          <td style="vertical-align: top; text-align: center;"><a id="start" href="a">a</a></td>
+          <td style="vertical-align: top; text-align: center;"><a id="2" href="a">a</a></td>
+          <td style="vertical-align: top; text-align: center;"><a id="3" href="a">a</a></td>
+        </tr>
+        <tr>
+          <td style="vertical-align: top; text-align: center;"><a id="4" href="a">a</a></td>
+          <td style="vertical-align: top; text-align: center;"><a id="5" href="a">a</a></td>
+          <td style="vertical-align: top; text-align: center;"><a id="6" href="a">a</a></td>
+        </tr>
+        <tr>
+          <td style="vertical-align: top; text-align: center;"><a id="7" href="a">a</a></td>
+          <td style="vertical-align: top; text-align: center;"><a id="8" href="a">a</a></td>
+          <td style="vertical-align: top; text-align: center;"><a id="9" href="a">a</a></td>
+        </tr>
+      </tbody>
+    </table>
+    <div style='margin-top:100px'>
+      <a id="end" href="a">End of table traversal test</a>
+    </div>
+    <div id="console"></div>
+  </body>
+</html>
diff --git a/LayoutTests/fast/events/spatial-navigation/snav-textarea-expected.txt b/LayoutTests/fast/spatial-navigation/snav-textarea-expected.txt
similarity index 100%
rename from LayoutTests/fast/events/spatial-navigation/snav-textarea-expected.txt
rename to LayoutTests/fast/spatial-navigation/snav-textarea-expected.txt
diff --git a/LayoutTests/fast/spatial-navigation/snav-textarea.html b/LayoutTests/fast/spatial-navigation/snav-textarea.html
new file mode 100644
index 0000000..ab85224
--- /dev/null
+++ b/LayoutTests/fast/spatial-navigation/snav-textarea.html
@@ -0,0 +1,84 @@
+<!DOCTYPE html>
+  <head>
+    <script src="../js/resources/js-test-pre.js"></script>
+    <script src="resources/spatial-navigation-utils.js"></script>
+    <script src="js/resources/js-test-post.js"></script>
+  </head>
+  <body id="some-content" xmlns="http://www.w3.org/1999/xhtml">
+    <p id="description"></p>
+    <table style="text-align: left; width: 100%; margin-left: auto; margin-right: auto;" border="1" cellpadding="2" cellspacing="1">
+      <tbody>
+        <tr>
+          <td style="vertical-align: top; text-align: center;"></td>
+          <td style="vertical-align: top; text-align: center;"><a id="2" href="a">2</a></td>
+          <td style="vertical-align: top; text-align: center;"></td>
+        </tr>
+        <tr>
+          <td style="vertical-align: top; text-align: center;"><a id="4" href="a">4</a></td>
+          <td style="vertical-align: top; text-align: center;"><textarea id="start" rows="5" cols="2">abc d</textarea>
+          <td style="vertical-align: top; text-align: center;"><a id="6" href="a">6</a></td>
+        </tr>
+        <tr>
+          <td style="vertical-align: top; text-align: center;"></td>
+          <td style="vertical-align: top; text-align: center;"><a id="8" href="a">8</a></td>
+          <td style="vertical-align: top; text-align: center;"></td>
+        </tr>
+      </tbody>
+    </table>
+    <div id="console"></div>
+    <script type="application/javascript">
+    description('This test ensures the correctness of Spatial Navigation (SNav) algorithm over textarea.<br>\
+                * Pre-conditions:<br>\
+                1) DRT support for SNav enable/disable.<br>\
+                * Navigation steps:<br>\
+                1) Loads this page, focus goes to "start" automatically.<br>\
+                2) Focus moves away from textarea in 4 different directions to neighbor nodes and back.<br>');
+
+    var resultMap = [
+      ["Down", "start"],
+      ["Down", "start"],
+      ["Down", "8"],
+      ["Up", "start"],
+      ["Up", "2"],
+      ["Down", "start"],
+      ["Right", "start"],
+      ["Right", "start"],
+      ["Right", "start"],
+      ["Right", "start"],
+      ["Right", "start"],
+      ["Right", "6"],
+      ["Left", "start"],
+      ["Left", "4"],
+      ["Right", "start"],
+      ["DONE", "DONE"]
+    ];
+
+    if (window.layoutTestController) {
+      layoutTestController.dumpAsText();
+      layoutTestController.setSpatialNavigationEnabled(true);
+      layoutTestController.overridePreference("WebKitTabToLinksPreferenceKey", 1);
+      layoutTestController.waitUntilDone();
+    }
+
+    function runTest()
+    {
+      var textarea = document.getElementById("start");
+      textarea.value = "abc\nd";
+
+      // starting the test itself: get to a known place.
+      document.getElementById("start").focus();
+
+      initTest(resultMap, testCompleted);
+    }
+
+    function testCompleted()
+    {
+      if (window.layoutTestController)
+        layoutTestController.notifyDone();
+    }
+
+    window.onload = runTest;
+
+    </script>
+  </body>
+</html>
diff --git a/LayoutTests/fast/events/spatial-navigation/snav-tiny-table-traversal-expected.txt b/LayoutTests/fast/spatial-navigation/snav-tiny-table-traversal-expected.txt
similarity index 100%
rename from LayoutTests/fast/events/spatial-navigation/snav-tiny-table-traversal-expected.txt
rename to LayoutTests/fast/spatial-navigation/snav-tiny-table-traversal-expected.txt
diff --git a/LayoutTests/fast/spatial-navigation/snav-tiny-table-traversal.html b/LayoutTests/fast/spatial-navigation/snav-tiny-table-traversal.html
new file mode 100644
index 0000000..70ba0f5
--- /dev/null
+++ b/LayoutTests/fast/spatial-navigation/snav-tiny-table-traversal.html
@@ -0,0 +1,93 @@
+<html>
+  <!--
+    This test ensures the basic table traversal correctness of
+    Spatial Navigation (SNav) algorithm: focusable elements in a
+    <table> should be accessible.
+
+    * Pre-conditions:
+    1) DRT support for SNav enable/disable.
+
+    * Navigation steps:
+    1) Loads this page, focus goes to "start" automatically.
+    2) Focus moves along the elements in the table, eventually
+       going to outer southward and eastward links, but going
+       back inside the table later on.
+  -->
+  <head>
+    <script src="../js/resources/js-test-pre.js"></script>
+    <script src="resources/spatial-navigation-utils.js"></script>
+    <script type="application/javascript">
+
+    var resultMap = [
+      ["Down", "1"],
+      ["Down", "4"],
+      ["Down", "7"],
+      ["Down", "end"],
+      ["Up", "7"],
+      ["Right", "8"],
+      ["Right", "9"],
+      ["Up", "6"],
+      ["Right", "right"],
+      ["Left", "6"],
+      ["Up", "3"],
+      ["Left", "2"],
+      ["Left", "1"],
+      ["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();
+
+      initTest(resultMap, testCompleted);
+    }
+
+    function testCompleted()
+    {
+      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">a</a><br>
+    <table>
+      <tbody>
+        <tr>
+          <td style="font-size: small;"><a id="1" href="a">a</a></td>
+          <td style="font-size: small;"><a id="2" href="a">a</a></td>
+          <td style="font-size: small;"><a id="3" href="a">a</a></td>
+        </tr>
+        <tr>
+          <td style="font-size: small;"><a id="4" href="a">a</a></td>
+          <td style="font-size: small;"><a id="5" href="a">a</a></td>
+          <td style="font-size: small;"><a id="6" href="a">a</a></td>
+        </tr>
+        <tr>
+          <td style="font-size: small;"><a id="7" href="a">a</a></td>
+          <td style="font-size: small;"><a id="8" href="a">a</a></td>
+          <td style="font-size: small;"><a id="9" href="a">a</a></td>
+        </tr>
+      </tbody>
+    </table>
+    <div style='margin-top:8px'>
+      <a id="end" href="a">a<a>
+    </div>
+    <div style="margin-left: 50px; margin-top:-70px">
+      <a id="right" href="http://www.google.com">a</a>
+    </div>
+    <div style="margin-top:100px" id="console"></div>
+  </body>
+</html>
diff --git a/LayoutTests/fast/events/spatial-navigation/snav-unit-overflow-and-scroll-in-direction-expected.txt b/LayoutTests/fast/spatial-navigation/snav-unit-overflow-and-scroll-in-direction-expected.txt
similarity index 100%
rename from LayoutTests/fast/events/spatial-navigation/snav-unit-overflow-and-scroll-in-direction-expected.txt
rename to LayoutTests/fast/spatial-navigation/snav-unit-overflow-and-scroll-in-direction-expected.txt
diff --git a/LayoutTests/fast/spatial-navigation/snav-unit-overflow-and-scroll-in-direction.html b/LayoutTests/fast/spatial-navigation/snav-unit-overflow-and-scroll-in-direction.html
new file mode 100644
index 0000000..18472de
--- /dev/null
+++ b/LayoutTests/fast/spatial-navigation/snav-unit-overflow-and-scroll-in-direction.html
@@ -0,0 +1,96 @@
+<html>
+  <!--
+    This test ensures the correctness the following Spatial Navigation
+    (SNav) algorithm features.
+
+    1) There is no unit overflow in the Spatial Navigation algorithm while
+       calculating the best node candidate to move focus to. To test that this
+       page positions some elements 10000000 pixels far from each other (distance
+       that can considered large enough for most of the Web Pages on the
+       Internet).
+
+    2) Make sure that a best focusable candidate only gets focused
+       if it is visible in the current Viewport. Scroll-in-direction
+       is performed otherwise.
+
+    * Pre-conditions:
+    1) DRT support for SNav enable/disable.
+
+    * Navigation steps:
+    1) Loads this page, focus goes to "start" automatically.
+    2) Attempt to move focus down to "end. As it is too far and out of
+       viewport, focus change will not happen and page will be scrolled
+       a step down.
+    3) By sending an "End" keypress, page gets scrolled down to a place
+       where the "end" node gets visible in the viewport.
+    4) Step _1_ is ran again, and "end" gets focused. -->
+  <head>
+    <script src="../js/resources/js-test-pre.js"></script>
+    <script src="resources/spatial-navigation-utils.js"></script>
+    <script type="application/javascript">
+
+    var resultMap1 = [
+      ["Down", "start"],
+      ["", ""]
+    ];
+
+    var resultMap2 = [
+      ["Down", "end"],
+      ["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();
+
+      setTimeout(step1 , 0);
+      setTimeout(step2 , 50);
+    }
+
+    function step1()
+    {
+      // Actions in 'resultMap1' should keep the focus in the currently
+      // focused element ('start') once the best candidate ('end') is not
+      // visible in current viewport.
+      initTest(resultMap1);
+    }
+
+    function step2()
+    {
+      shouldBeTrue(String(document.body.scrollTop != 0));
+
+      // Then it scrolls down to the end of the page ...
+      if (window.eventSender)
+        eventSender.keyDown("end");
+
+      // And 'resultMap2' re-tries to move focus down.
+      initTest(resultMap2, testCompleted);
+    }
+
+    function testCompleted()
+    {
+      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:100000000px'>
+        <a id="end" href="a">End</a>
+    </div>
+    <div id="console"></div>
+  </body>
+</html>
diff --git a/LayoutTests/fast/events/spatial-navigation/snav-z-index-expected.txt b/LayoutTests/fast/spatial-navigation/snav-z-index-expected.txt
similarity index 100%
rename from LayoutTests/fast/events/spatial-navigation/snav-z-index-expected.txt
rename to LayoutTests/fast/spatial-navigation/snav-z-index-expected.txt
diff --git a/LayoutTests/fast/spatial-navigation/snav-z-index.html b/LayoutTests/fast/spatial-navigation/snav-z-index.html
new file mode 100644
index 0000000..6c7b344
--- /dev/null
+++ b/LayoutTests/fast/spatial-navigation/snav-z-index.html
@@ -0,0 +1,80 @@
+<html>
+  <head>
+    <script src="../js/resources/js-test-pre.js"></script>
+    <script src="resources/spatial-navigation-utils.js"></script>
+    <script type="application/javascript">
+
+    var resultMap = [
+      ["Down", "p11"],
+      ["Down", "p12"],
+      ["Down", "s25"],
+      ["Up", "p12"],
+      ["Left", "s13"],
+      ["Up", "s12"],
+      ["Right", "p11"],
+      ["Right", "p21"],
+      ["Up", "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();
+
+      initTest(resultMap, testCompleted);
+    }
+
+    function testCompleted()
+    {
+      if (window.layoutTestController)
+        layoutTestController.notifyDone();
+    }
+
+    window.onload = runTest;
+    </script>
+    <script src="js/resources/js-test-post.js"></script>
+    <style>
+    div.simple { border: 3px solid red;}
+    div.simple:focus { border: 3px solid gray;}
+    div.positioned { border: 3px solid blue;}
+    div.positioned:focus{ border: 3px solid gray;}
+    #popup {position: absolute; top:120; left:240; border: 8px solid black; z-index:1000}
+    </style>
+  </head>
+<body id="some-content" xmlns="http://www.w3.org/1999/xhtml" style="padding:20px">
+<div id="popup">
+<table><tr><td>
+<div tabindex="1" id="p11" class="positioned"><img src="resources/green.png" width=160px height=60px></div>
+<div tabindex="2" id="p12" class="positioned"><img src="resources/green.png" width=160px height=60px></div>
+</td><td>
+<div tabindex="1" id="p21" class="positioned"><img src="resources/green.png" width=160px height=60px></div>
+<div tabindex="2" id="p22" class="positioned"><img src="resources/green.png" width=160px height=60px></div>
+</td></tr></table>
+</div>
+
+<table>
+<tr><td>
+<div tabindex="1" id="s11" class="simple"><img src="resources/green.png" width=160px height=60px></div>
+<div tabindex="2" id="s12" class="simple"><img src="resources/green.png" width=160px height=60px></div>
+<div tabindex="3" id="s13" class="simple"><img src="resources/green.png" width=160px height=60px></div>
+<div tabindex="4" id="s14" class="simple"><img src="resources/green.png" width=160px height=60px></div>
+<div tabindex="5" id="s15" class="simple"><img src="resources/green.png" width=160px height=60px></div>
+</td><td>
+<div tabindex="1" id="start" class="simple"><img src="resources/green.png" width=160px height=60px></div>
+<div tabindex="2" id="s22" class="simple"><img src="resources/green.png" width=160px height=60px></div>
+<div tabindex="3" id="s23" class="simple"><img src="resources/green.png" width=160px height=60px></div>
+<div tabindex="4" id="s24" class="simple"><img src="resources/green.png" width=160px height=60px></div>
+<div tabindex="5" id="s25" class="simple"><img src="resources/green.png" width=160px height=60px></div>
+</td></tr></table>
+<div id="console"></div>
+This test is testing that we prefer focusable elements with absolute positioning over other elements.
+</body>
+</html>
diff --git a/LayoutTests/fast/events/spatial-navigation/snav-zero-margin-content-expected.txt b/LayoutTests/fast/spatial-navigation/snav-zero-margin-content-expected.txt
similarity index 100%
rename from LayoutTests/fast/events/spatial-navigation/snav-zero-margin-content-expected.txt
rename to LayoutTests/fast/spatial-navigation/snav-zero-margin-content-expected.txt
diff --git a/LayoutTests/fast/spatial-navigation/snav-zero-margin-content.html b/LayoutTests/fast/spatial-navigation/snav-zero-margin-content.html
new file mode 100644
index 0000000..0f1207f
--- /dev/null
+++ b/LayoutTests/fast/spatial-navigation/snav-zero-margin-content.html
@@ -0,0 +1,70 @@
+<html>
+  <!--
+    This test ensures the traversal correctness of spatial navigation:
+    focusable elements accessible, including zero-margin content, should be
+    accessible.
+  -->
+  <head>
+    <style type="text/css">
+      body {
+        background:none repeat scroll 0 0 #FFFFFF;
+        color:black;
+        margin:0;
+      }
+
+      body, a, {
+        font-family:arial,sans-serif;
+        margin-right:2.5em;
+        font-size:13px;
+        text-decoration:underline;
+        color:#0000CC !important;
+      }
+    </style>
+
+    <script src="../js/resources/js-test-pre.js"></script>
+    <script src="resources/spatial-navigation-utils.js"></script>
+    <script type="application/javascript">
+
+    var resultMap = [
+      ["Right", "end"],
+      ["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();
+
+      initTest(resultMap, testCompleted);
+    }
+
+    function testCompleted()
+    {
+      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">
+    <span>
+      <div>
+        <nobr>
+          <a href="#" id="start"> test1 </a>
+          <a href="#" id="end"> test2 </a>
+        </nobr>
+      </div>
+    </span>
+    <div id="console"></div>
+  </body>
+</html>
diff --git a/LayoutTests/platform/mac-wk2/Skipped b/LayoutTests/platform/mac-wk2/Skipped
index 039503c..35160bf 100644
--- a/LayoutTests/platform/mac-wk2/Skipped
+++ b/LayoutTests/platform/mac-wk2/Skipped
@@ -1905,7 +1905,7 @@ fast/dom/nodesFromRect-inner-documents.html
 fast/dom/nodesFromRect-links-and-text.html
 
 # WebKitTestRunner needs layoutTestController.setSpatialNavigationEnabled
-fast/events/spatial-navigation
+fast/spatial-navigation
 
 # WebKitTestRunner needs layoutTestController.pageSizeAndMarginsInPixels
 printing/page-format-data-display-none.html
diff --git a/LayoutTests/platform/qt-wk2/Skipped b/LayoutTests/platform/qt-wk2/Skipped
index c608611..e000bcc 100644
--- a/LayoutTests/platform/qt-wk2/Skipped
+++ b/LayoutTests/platform/qt-wk2/Skipped
@@ -2399,7 +2399,7 @@ svg/dynamic-updates
 fast/viewport
 
 # layoutTestController.setSpatialNavigationEnabled is unimplemented
-fast/events/spatial-navigation
+fast/spatial-navigation
 
 # eventSender.clearTouchPoints is unimplemented
 fast/events/touch
diff --git a/LayoutTests/platform/win/Skipped b/LayoutTests/platform/win/Skipped
index 5437c8b..15e3ece 100644
--- a/LayoutTests/platform/win/Skipped
+++ b/LayoutTests/platform/win/Skipped
@@ -862,7 +862,7 @@ plugins/plugin-initiate-popup-window.html
 java
 
 # Need to add functionality to DumpRenderTree to handle enable/disable Spatial Navigation
-fast/events/spatial-navigation
+fast/spatial-navigation
 
 # For some reason crashes when run with all tests. Passes individually.
 fast/forms/multiple-form-submission-protection-mouse.html

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list