Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / events / related-target-focusevent.html
blob8d7c6c69b53d11a438b922244e1164195535773e
1 <html>
2 <head>
3 <script src="../../resources/js-test.js"></script>
4 </head>
5 <body>
6 <p id="description"></p>
7 <input id="input1" type="text"></input>
8 <input id="input2" type="text"></input>
9 <input id="input3" type="text"></input>
10 <script>
11 jsTestIsAsync = true;
13 description("Checks that the relatedTarget attribute for FocusEvent objects is being set correctly when focusin/focusout events are dispatched. <b>Press tab four times</b> to dispatch a focusin and focusout event for each of the inputs below.");
15 var input1 = document.getElementById('input1');
16 var input2 = document.getElementById('input2');
17 var input3 = document.getElementById('input3');
19 input1.addEventListener("focusin", function(event) { shouldBeNull('event.relatedTarget'); });
20 input1.addEventListener("focusout", function(event) { shouldBe('event.relatedTarget', 'input2'); });
21 input1.addEventListener("focus", function(event) { shouldBeNull('event.relatedTarget'); });
22 input1.addEventListener("blur", function(event) { shouldBe('event.relatedTarget', 'input2'); });
23 input2.addEventListener("focusin", function(event) { shouldBe('event.relatedTarget', 'input1'); });
24 input2.addEventListener("focusout", function(event) { shouldBe('event.relatedTarget', 'input3'); });
25 input2.addEventListener("focus", function(event) { shouldBe('event.relatedTarget', 'input1'); });
26 input2.addEventListener("blur", function(event) { shouldBe('event.relatedTarget', 'input3'); finishJSTest(); });
28 input1.focus();
29 for (var i = 0; i < 2; i++) {
30 eventSender.keyDown('\t');
32 </script>
33 </body>
34 </html>