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

Unified Diff: third_party/WebKit/LayoutTests/fast/dom/fragment-activation-focuses-target.html

Issue 1438953002: Update selection when an element is focused by in-document fragment link. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/dom/fragment-activation-focuses-target-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/fast/dom/fragment-activation-focuses-target.html
diff --git a/third_party/WebKit/LayoutTests/fast/dom/fragment-activation-focuses-target.html b/third_party/WebKit/LayoutTests/fast/dom/fragment-activation-focuses-target.html
index 8bf03284dabb23743e7c97ce3db0e15eba3198a2..a4b49d002e690ce151ada2b97ba006933d7e385d 100644
--- a/third_party/WebKit/LayoutTests/fast/dom/fragment-activation-focuses-target.html
+++ b/third_party/WebKit/LayoutTests/fast/dom/fragment-activation-focuses-target.html
@@ -9,9 +9,11 @@
<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>
+ <a href="#input1" id="link6" tabindex="0">link6</a>
<br><br>
<div id="fragment1" name="fragment1" tabindex="0">fragment1</div>
<div id="fragment2" name="fragment2">fragment2</div>
+ <input id="input1" value="abcdef">
<script>
description("This tests that if an in-page link is activated, focus control is transferred to the fragment if possible.");
@@ -62,6 +64,18 @@
link5.click();
shouldBe("document.activeElement", "link5");
+ debug("Activate a link to an INPUT elemnt, verify that the INPUT is editable");
+ var input1 = document.getElementById("input1");
+ input1.setSelectionRange(3, 3);
+ var link6 = document.getElementById("link6");
+ link6.focus();
+ shouldBe("document.activeElement", "link6");
+ link6.click();
+ shouldBe("document.activeElement", "input1");
+ if (window.eventSender) {
+ eventSender.keyDown('X');
+ shouldBeEqualToString("input1.value", "abcXdef");
+ }
var successfullyParsed = true;
</script>
</body>
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/dom/fragment-activation-focuses-target-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698