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(); |
}; |