Index: LayoutTests/fast/spatial-navigation/snav-symmetrically-positioned.html |
diff --git a/LayoutTests/fast/spatial-navigation/snav-overlapping-elements.html b/LayoutTests/fast/spatial-navigation/snav-symmetrically-positioned.html |
similarity index 59% |
copy from LayoutTests/fast/spatial-navigation/snav-overlapping-elements.html |
copy to LayoutTests/fast/spatial-navigation/snav-symmetrically-positioned.html |
index f5679a8825e93281a111665c9feba535024a8529..85986fa2edd335eabf128303b7e9af3dc439343f 100644 |
--- a/LayoutTests/fast/spatial-navigation/snav-overlapping-elements.html |
+++ b/LayoutTests/fast/spatial-navigation/snav-symmetrically-positioned.html |
@@ -6,67 +6,55 @@ |
<style> |
body a { |
position: absolute; |
- height: 100px; |
- width: 100px; |
+ height: 40px; |
+ width: 80px; |
border: 1px solid black; |
} |
#e1 { |
- left: 10px; |
- top: 10px; |
+ left: calc(100px - 100px / 2); |
+ top: calc(150px - 100px / 2); |
} |
#e2 { |
- left: 20px; |
- top: 75px; |
+ left: calc(400px - 100px / 2); |
+ top: calc(150px - 100px / 2); |
} |
#e3 { |
- left: 10px; |
- top: 150px; |
+ left: calc((400px + 100px) / 2 - 100px / 2); |
+ top: calc((450px + 150px) / 2 - 100px / 2); |
} |
#e4 { |
- left: 10px; |
- top: 300px; |
+ left: calc(100px - 100px / 2); |
+ top: calc(450px - 100px / 2); |
} |
#e5 { |
- left: 75px; |
- top: 300px; |
-} |
-#e6 { |
- left: 150px; |
- top: 300px; |
+ left: calc(400px - 100px / 2); |
+ top: calc(450px - 100px / 2); |
} |
</style> |
<body id="some-content" onload="runTest()"> |
<p id="description"></p> |
<div id="elements"> |
-<!-- Vertical: --> |
-<a id="e1" href="#e1">Element 1</a> |
-<a id="e2" href="#e2">Element 2</a> |
-<a id="e3" href="#e3">Element 3</a> |
-<!-- Horizontal: --> |
-<a id="e4" href="#e1">Element 4</a> |
-<a id="e5" href="#e2">Element 5</a> |
-<a id="e6" href="#e3">Element 6</a> |
+<a id="e1" href="#e1">E1</a> |
+<a id="e2" href="#e2">E2</a> |
+<a id="e3" href="#e3">E3</a> |
+<a id="e4" href="#e4">E4</a> |
+<a id="e5" href="#e5">E5</a> |
</div> |
<div id="console"></div> |
<script type="application/javascript"> |
-description('This test ensures that Spatial Navigation works with overlapping elements'); |
+description('This test ensures that Spatial Navigation works with symmetrically positoned rects'); |
jsTestIsAsync = true; |
var resultMap = [ |
- // Vertical: |
- ["Down", "e2"], |
["Down", "e3"], |
- ["Up", "e2"], |
+ ["Down", "e4"], |
+ ["Up", "e3"], |
["Up", "e1"], |
- ["Down", "e2"], |
+ ["Right", "e2"], |
["Down", "e3"], |
["Down", "e4"], |
- // Horizontal: |
["Right", "e5"], |
- ["Right", "e6"], |
- ["Left", "e5"], |
- ["Left", "e4"], |
["DONE", "DONE"] |
]; |