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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/dom/HTMLAnchorElement/remove-href-from-focused-anchor.html

Issue 2586143004: Blur immediately if an attribute change made an element unfocasable. (Closed)
Patch Set: Update comments and a function name Created 3 years, 12 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
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/dom/HTMLAnchorElement/remove-href-from-focused-anchor-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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(); 8 target.focus();
9 shouldBe('document.activeElement', 'target'); 9 shouldBe('document.activeElement', 'target');
10 debug('Remove href.'); 10 debug('Remove href.');
11 window.onload = function() { 11 window.onload = function() {
12 target.addEventListener('blur', function() { 12 target.removeAttribute('href');
13 testPassed('blur event was disaptched.'); 13 shouldBe('document.activeElement', 'document.body');
14 target.remove(); 14 target.remove();
15 finishJSTest(); 15 finishJSTest();
16 }, false);
17 // Need to wait until CheckFocusedElementTask is unqueued.
18 setTimeout(function() {
19 target.removeAttribute('href');
20 }, 10);
21 setTimeout(function() {
22 testFailed('No blur event');
23 finishJSTest();
24 }, 2000);
25 }; 16 };
26 </script> 17 </script>
27 </body> 18 </body>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/dom/HTMLAnchorElement/remove-href-from-focused-anchor-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698