Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(197)

Unified Diff: LayoutTests/fast/spatial-navigation/snav-css-nav-direction.html

Issue 17450016: Implementation of CSS3 nav-up/down/left/right properties from CSS3 UI. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebased once again to master, fixed layout test. Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: LayoutTests/fast/spatial-navigation/snav-css-nav-direction.html
diff --git a/LayoutTests/fast/spatial-navigation/snav-css-nav-direction.html b/LayoutTests/fast/spatial-navigation/snav-css-nav-direction.html
new file mode 100644
index 0000000000000000000000000000000000000000..29556af9b15b115bb4abcdeec5769148e54666c8
--- /dev/null
+++ b/LayoutTests/fast/spatial-navigation/snav-css-nav-direction.html
@@ -0,0 +1,82 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script src="../../resources/js-test.js"></script>
+<script src="resources/spatial-navigation-utils.js"></script>
+<script type="application/javascript">
+jsTestIsAsync = true;
+
+var resultMap = [
+ ["Right", "e9"],
+ ["Up", "e9"],
+ ["Right", "e5"],
+ ["Up", "e2"],
+ ["Left", "e4"],
+ ["Left", "e6"],
+ ["Down", "e8"],
+ ["Down", "e5"],
+ ["DONE", "DONE"]
+];
+
+if (window.testRunner) {
+ testRunner.overridePreference("WebKitTabToLinksPreferenceKey", 1);
+ window.internals.settings.setSpatialNavigationEnabled(true);
+}
+
+function runTest()
+{
+ // starting the test itself: get to a known place.
+ document.getElementById("e5").focus();
+
+ initTest(resultMap, finishJSTest);
+}
+</script>
+</head>
+<style>
+#e2 {
+ nav-left: #e4;
+}
+#e4 {
+ nav-left: #e6;
+}
+#e5 {
+ nav-right: #e9;
+ nav-up: #e2;
+}
+#e6 {
+ nav-down: #e8;
+}
+#e8 {
+ nav-down: #e5;
+}
+#e9 {
+ nav-up: #e9;
+ nav-right: #e5;
+}
+</style>
+<body id="some-content" onload="runTest();">
+<p id="description">
fs 2014/04/14 12:32:01 You could use js-test framework's description(...)
Krzysztof Olczyk 2014/04/17 13:48:40 But you still need physical <div>, don't you? I wa
fs 2014/04/17 15:33:48 The framework will create the elements as needed (
+This test ensures the correctness of Spatial Navigation when CSS3 nav-up/down/left/right properties are set.
+</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;"><a id="e1" href="a">1</a></td>
+<td style="vertical-align: top; text-align: center;"><a id="e2" href="a">2</a></td>
+<td style="vertical-align: top; text-align: center;"><a id="e3" href="a">3</a></td>
+</tr>
+<tr>
+<td style="vertical-align: top; text-align: center;"><a id="e4" href="a">4</a></td>
+<td style="vertical-align: top; text-align: center;"><a id="e5" href="5">5</td>
+<td style="vertical-align: top; text-align: center;"><a id="e6" href="a">6</a></td>
+</tr>
+<tr>
+<td style="vertical-align: top; text-align: center;"><a id="e7" href="a">7</a></td>
+<td style="vertical-align: top; text-align: center;"><a id="e8" href="a">8</a></td>
+<td style="vertical-align: top; text-align: center;"><a id="e9" href="a">9</a></td>
+</tr>
+</tbody>
+</table>
+<div id="console"></div>
fs 2014/04/14 12:32:01 The test framework should provide this too.
Krzysztof Olczyk 2014/04/17 13:48:40 But you still need physical <div>, don't you? I wa
+</body>
+</html>

Powered by Google App Engine
This is Rietveld 408576698