3 <script src=
"../../resources/js-test.js"></script>
4 <script src=
"resources/record-events.js"></script>
7 testRunner
.dumpAsText();
9 window
.onload
= runTest
;
13 if (!window
.eventSender
)
16 var firstInput
= document
.getElementById("firstInput");
17 var secondInput
= document
.getElementById("secondInput");
18 registerElementsAndEventsToRecord([firstInput
, secondInput
], ["focus", "blur", "change", "click"]);
20 beginRecordingEvents();
22 eventSender
.keyDown("A");
23 eventSender
.keyDown("\t"); // Transfers focus to text field "second input".
25 checkThatEventsFiredInOrder([["firstInput", "focus"], ["firstInput", "change"], ["firstInput", "blur"], ["secondInput", "focus"]]);
26 debug('<br /><span class="pass">TEST COMPLETE</span>');
31 <p id=
"description"></p>
32 <div id=
"test-container">
33 <input type=
"text" id=
"firstInput" placeholder=
"first input" />
34 <input type=
"text" id=
"secondInput" placeholder=
"second input" />
36 <div id=
"console"></div>
38 description("This test checks that when a user focuses on the "first input" text field, modifies its contents, and then " +
39 "defocuses it by pressing the tab key that the following DOM events are fired in order: Focus, Change, Blur, Focus " +
40 "(on "second input"). Note, this test must be run by Dump Render Tree.");