},
          {element: input2, event_name: "focus"},
        ]
      },

      {
        element: input3,
        expected_events: [
          {element: input2, event_name: "blur"},
          {element: input3, event_name: "focus"},
        ]
      },

    ];

    var idx = 0;

    var received_events = [];

    function on_event(element, event_name) {
      received_events.push({element, event_name});
      if (received_events.length == phases[idx].expected_events.length) {
        for (var i = 0; i < recei