), true);
        child.addEventListener('click', this.step_func(function(){ order.push(2) }), false);
        parent.addEventListener('click', this.step_func(function(){ order.push(3) }), false);

        child.dispatchEvent(new Event('click', {bubbles: true}));

        assert_array_equals(order, [1, 2, 3]);
    }));
}, "Event phases order");
</script>
<div id="parent">
    <div id="child"></div>
</div>
