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

Side by Side 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 unified diff | Download patch
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <body> 2 <body>
3 <a href="javascript:" id="target">link</a> 3 <a href="javascript:" id="target">link</a>
4 <script src="../../../resources/js-test.js"></script> 4 <script src="../../../resources/js-test.js"></script>
5 <script> 5 <script>
6 jsTestIsAsync = true; 6 jsTestIsAsync = true;
7 var target = document.getElementById('target'); 7 var target = document.getElementById('target');
8 target.focus();
9 shouldBe('document.activeElement', 'target');
10 debug('Remove href.');
11 window.onload = function() { 8 window.onload = function() {
9 debug('Remove href.');
10 target.focus();
11 shouldBe('document.activeElement', 'target');
12 target.removeAttribute('href'); 12 target.removeAttribute('href');
13 shouldBe('document.activeElement', 'document.body'); 13 shouldBe('document.activeElement', 'document.body');
14
15 debug('Update href.');
16 target.href = 'javascript:';
17 target.focus();
18 target.href = 'javascript:undefined';
19 shouldBe('document.activeElement', 'target');
20
14 target.remove(); 21 target.remove();
15 finishJSTest(); 22 finishJSTest();
16 }; 23 };
17 </script> 24 </script>
18 </body> 25 </body>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698