| Index: LayoutTests/fast/dom/fragment-activation-focuses-target.html
|
| ===================================================================
|
| --- LayoutTests/fast/dom/fragment-activation-focuses-target.html (revision 184784)
|
| +++ LayoutTests/fast/dom/fragment-activation-focuses-target.html (working copy)
|
| @@ -6,6 +6,9 @@
|
| <body>
|
| <a href="#fragment1" id="link1" tabindex="0">link1</a>
|
| <a href="#fragment2" id="link2" tabindex="0">link2</a>
|
| + <a href="#fragment3" id="link3" tabindex="0">link3</a>
|
| + <a href="#top" id="link4" tabindex="0">link4</a>
|
| + <a href="#" id="link5" tabindex="0">link5</a>
|
| <br><br>
|
| <div id="fragment1" name="fragment1" tabindex="0">fragment1</div>
|
| <div id="fragment2" name="fragment2">fragment2</div>
|
| @@ -31,13 +34,34 @@
|
| shouldBe("document.activeElement", "document.getElementById('fragment1')");
|
| }
|
|
|
| - debug("Activate a link that does not have a focusable fragment and verify focus does not move.");
|
| + debug("Activate a link that does not have a focusable fragment and verify that the currently focused element is unfocused.");
|
| var link2 = document.getElementById("link2");
|
| link2.focus();
|
| shouldBe("document.activeElement", "link2");
|
| link2.click();
|
| - shouldBe("document.activeElement", "link2");
|
| + shouldBe("document.activeElement", "document.body");
|
|
|
| + debug("Activate a link that does not refer to an existing fragment and verify that the currently focused element remains focused.");
|
| + var link3 = document.getElementById("link3");
|
| + link3.focus();
|
| + shouldBe("document.activeElement", "link3");
|
| + link3.click();
|
| + shouldBe("document.activeElement", "link3");
|
| +
|
| + debug("Activate a link to #top and verify that the link remains focused");
|
| + var link4 = document.getElementById("link4");
|
| + link4.focus();
|
| + shouldBe("document.activeElement", "link4");
|
| + link4.click();
|
| + shouldBe("document.activeElement", "link4");
|
| +
|
| + debug("Activate a link to # and verify that the link remains focused");
|
| + var link5 = document.getElementById("link5");
|
| + link5.focus();
|
| + shouldBe("document.activeElement", "link5");
|
| + link5.click();
|
| + shouldBe("document.activeElement", "link5");
|
| +
|
| var successfullyParsed = true;
|
| </script>
|
| </body>
|
|
|