Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / events / focus-click-on-non-mouse-focusable-element.html
blobe5226e82394a589ded85c11dfb8db273e353c657
1 <!DOCTYPE html>
2 <body>
3 <a href="#foo" onclick="return false;">link</a>
4 <input>
5 <script src="../../resources/js-test.js"></script>
6 <script>
7 description('Click on a focused anchor element should not change focus, and click on a non-focused anchor element should remove focus of another element.');
8 jsTestIsAsync = true;
9 var a = document.querySelector('a');
10 var input = document.querySelector('input');
11 window.onload = function() {
12 a.focus();
13 shouldBe('document.activeElement', 'a', true);
14 eventSender.mouseMoveTo(a.offsetLeft + a.offsetWidth / 2, a.offsetTop + a.offsetHeight / 2);
15 eventSender.mouseDown();
16 eventSender.mouseUp();
17 shouldBe('document.activeElement', 'a');
19 input.focus();
20 eventSender.mouseDown();
21 eventSender.mouseUp();
22 shouldBe('document.activeElement', 'document.body');
24 finishJSTest();
26 </script>
27 </body>