ved_events.length; i++) {
          assert_equals(received_events[i].element, phases[idx].expected_events[i].element);
          assert_equals(received_events[i].event_name, phases[idx].expected_events[i].event_name);
        }
        if (++idx < phases.length) {
          received_events = [];
          phases[idx].element.focus();
        } else {
          t.done();
        }
      }
    }

    for (var element of [div, input1, input2, input3]) {
      for (var event_name of ["focus", "blur"]) {
       