Update layout test verifying Tab behaves correctly after linking to fragment ID

https://bugs.webkit.org/show_bug.cgi?id=114645

Patch by Mario Sanchez Prada <mario.prada@samsung.com> on 2013-04-22
Reviewed by Chris Fleizach.

* fast/dom/fragment-activation-focuses-target.html: Updated test.
* fast/dom/fragment-activation-focuses-target-expected.txt: Updated expectations.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@148882 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent f47a9b27
2013-04-22 Mario Sanchez Prada <mario.prada@samsung.com>
Update layout test verifying Tab behaves correctly after linking to fragment ID
https://bugs.webkit.org/show_bug.cgi?id=114645
Reviewed by Chris Fleizach.
* fast/dom/fragment-activation-focuses-target.html: Updated test.
* fast/dom/fragment-activation-focuses-target-expected.txt: Updated expectations.
2013-04-22 Mike Fenton <mifenton@rim.com>
[BlackBerry] Add additional datalist support.
......@@ -11,6 +11,9 @@ Move focus back to the link and verify.
PASS document.activeElement is link1
Send an enter key event which should also trigger focus to move to the fragment.
PASS document.activeElement is document.getElementById('fragment1')
Verify Tab behaves correctly after following the link.
PASS document.activeElement is document.getElementById('fragment3')
PASS document.activeElement is document.getElementById('fragment1')
Activate a link that does not have a focusable fragment and verify focus does not move.
PASS document.activeElement is link2
PASS document.activeElement is link2
......@@ -21,3 +24,4 @@ link1 link2
fragment1
fragment2
fragment3
......@@ -12,6 +12,7 @@
<div id="fragment1" name="fragment1" tabindex="0">fragment1</div>
<div id="fragment2" name="fragment2">fragment2</div>
<div id="fragment3" name="fragment3" tabindex="0">fragment3</div>
<script>
......@@ -34,6 +35,12 @@ if (window.testRunner) {
debug("Send an enter key event which should also trigger focus to move to the fragment.");
eventSender.keyDown("\r");
shouldBe("document.activeElement", "document.getElementById('fragment1')");
debug("Verify Tab behaves correctly after following the link.");
eventSender.keyDown("\t");
shouldBe("document.activeElement", "document.getElementById('fragment3')");
eventSender.keyDown("\t", ["shiftKey"]);
shouldBe("document.activeElement", "document.getElementById('fragment1')");
}
debug("Activate a link that does not have a focusable fragment and verify focus does not move.");
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment