<!DOCTYPE html>
<title>HTMLTrackElement Text Track Selection Task Order</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script>
/**
 * This test is used to ensure that we queue 'honor user preferences for automatic
 * text track selection' as a macro task, not a micro task. In this test, we
 * trigger a media event before queuing a text track selection task, and check
 * the text track's mode to know whether the text track selection runs aft