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

Unified Diff: third_party/WebKit/LayoutTests/fast/dom/HTMLAnchorElement/update-href-of-focused-anchor.html

Issue 2623163002: Updating href attribute should not blur. (Closed)
Patch Set: Created 3 years, 11 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: third_party/WebKit/LayoutTests/fast/dom/HTMLAnchorElement/update-href-of-focused-anchor.html
diff --git a/third_party/WebKit/LayoutTests/fast/dom/HTMLAnchorElement/remove-href-from-focused-anchor.html b/third_party/WebKit/LayoutTests/fast/dom/HTMLAnchorElement/update-href-of-focused-anchor.html
similarity index 58%
rename from third_party/WebKit/LayoutTests/fast/dom/HTMLAnchorElement/remove-href-from-focused-anchor.html
rename to third_party/WebKit/LayoutTests/fast/dom/HTMLAnchorElement/update-href-of-focused-anchor.html
index c2b2c9892beae1166a546f4a3b32119b1dbd5bca..142f494bb610d1cc89924e920f73fdb532c93779 100644
--- a/third_party/WebKit/LayoutTests/fast/dom/HTMLAnchorElement/remove-href-from-focused-anchor.html
+++ b/third_party/WebKit/LayoutTests/fast/dom/HTMLAnchorElement/update-href-of-focused-anchor.html
@@ -5,12 +5,19 @@
<script>
jsTestIsAsync = true;
var target = document.getElementById('target');
-target.focus();
-shouldBe('document.activeElement', 'target');
-debug('Remove href.');
window.onload = function() {
+ debug('Remove href.');
+ target.focus();
+ shouldBe('document.activeElement', 'target');
target.removeAttribute('href');
shouldBe('document.activeElement', 'document.body');
+
+ debug('Update href.');
+ target.href = 'javascript:';
+ target.focus();
+ target.href = 'javascript:undefined';
+ shouldBe('document.activeElement', 'target');
+
target.remove();
finishJSTest();
};

Powered by Google App Engine
This is Rietveld 408576698