Use TextTrackKind enum in HTMLMediaElement.addTextTrack IDL signature

With https://codereview.chromium.org/831483004 is becomes possible to use
the TextTrackKind enum defined in TextTrack.idl without redefining it.
Do that, and also update the spec. steps in HTMLMediaElement::addTextTrack
to match a later version. Move the call to setReadinessState() since it
does not cause any side-effects, but add a comment about a potential issue
with the current order of setup.
Also add default values to the optional arguments and drop the unneeded
forwarders. This also means that undefined will now be properly handled
for these arguments.
Update tests to reflect the new exception thrown as well as the behavior
with undefined.

Review URL: https://codereview.chromium.org/790633003

git-svn-id: svn://svn.chromium.org/blink/trunk@188644 bbb929c8-8fbe-4397-9dbb-9b2b20218538
6 files changed
tree: 641aec0fbbde7b9e7ed47cedc2e78f96cf5f7d0d
  1. third_party/