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

Side by Side Diff: LayoutTests/fast/events/focus-click-on-non-mouse-focusable-element.html

Issue 58533003: Move fast/js/resources files to resources. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <body> 2 <body>
3 <a href="#foo" onclick="return false;">link</a> 3 <a href="#foo" onclick="return false;">link</a>
4 <input> 4 <input>
5 <script src="../js/resources/js-test-pre.js"></script> 5 <script src="../../resources/js-test.js"></script>
6 <script> 6 <script>
7 description('Click on a focused anchor element should not change focus, and clic k on a non-focused anchor element should remove focus of another element.'); 7 description('Click on a focused anchor element should not change focus, and clic k on a non-focused anchor element should remove focus of another element.');
8 jsTestIsAsync = true; 8 jsTestIsAsync = true;
9 var a = document.querySelector('a'); 9 var a = document.querySelector('a');
10 var input = document.querySelector('input'); 10 var input = document.querySelector('input');
11 window.onload = function() { 11 window.onload = function() {
12 a.focus(); 12 a.focus();
13 shouldBe('document.activeElement', 'a', true); 13 shouldBe('document.activeElement', 'a', true);
14 eventSender.mouseMoveTo(a.offsetLeft + a.offsetWidth / 2, a.offsetTop + a.of fsetHeight / 2); 14 eventSender.mouseMoveTo(a.offsetLeft + a.offsetWidth / 2, a.offsetTop + a.of fsetHeight / 2);
15 eventSender.mouseDown(); 15 eventSender.mouseDown();
16 eventSender.mouseUp(); 16 eventSender.mouseUp();
17 shouldBe('document.activeElement', 'a'); 17 shouldBe('document.activeElement', 'a');
18 18
19 input.focus(); 19 input.focus();
20 eventSender.mouseDown(); 20 eventSender.mouseDown();
21 eventSender.mouseUp(); 21 eventSender.mouseUp();
22 shouldBe('document.activeElement', 'document.body'); 22 shouldBe('document.activeElement', 'document.body');
23 23
24 finishJSTest(); 24 finishJSTest();
25 }; 25 };
26 </script> 26 </script>
27 </body> 27 </body>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698