Driving Test Canada Test 5 - Who has the right of way where a pedestrian is crossing while a traffic signal changes?

Who has the right of way where a pedestrian is crossing while a traffic signal changes?