Title: [205791] trunk
Revision
205791
Author
[email protected]
Date
2016-09-11 15:30:05 -0700 (Sun, 11 Sep 2016)

Log Message

HTMLTrackElement.kind's invalid value default should be the metadata state
https://bugs.webkit.org/show_bug.cgi?id=161840

Reviewed by Eric Carlson.

LayoutTests/imported/w3c:

Rebaseline existing tests now that more checks are passing.

* web-platform-tests/html/dom/reflection-embedded-expected.txt:
* web-platform-tests/html/semantics/embedded-content/media-elements/interfaces/HTMLElement/HTMLTrackElement/kind-expected.txt:
* web-platform-tests/html/semantics/embedded-content/media-elements/interfaces/TextTrack/kind-expected.txt:

Source/WebCore:

HTMLTrackElement.kind's invalid value default should be the metadata state,
not the subtitles state:
- https://html.spec.whatwg.org/#attr-track-kind

Chrome agrees with the specification.

No new tests, rebaselined existing tests.

* html/track/TextTrack.cpp:
(WebCore::TextTrack::setKindKeywordIgnoringASCIICase):

LayoutTests:

* media/track/track-kind-expected.txt:
* media/track/track-kind.html:
Update existing test to reflect behavior change.

* media/track/w3c/interfaces/TextTrack/kind.html:
Re-sync test from W3C as it was outdated.

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (205790 => 205791)


--- trunk/LayoutTests/ChangeLog	2016-09-11 18:11:42 UTC (rev 205790)
+++ trunk/LayoutTests/ChangeLog	2016-09-11 22:30:05 UTC (rev 205791)
@@ -1,3 +1,17 @@
+2016-09-11  Chris Dumez  <[email protected]>
+
+        HTMLTrackElement.kind's invalid value default should be the metadata state
+        https://bugs.webkit.org/show_bug.cgi?id=161840
+
+        Reviewed by Eric Carlson.
+
+        * media/track/track-kind-expected.txt:
+        * media/track/track-kind.html:
+        Update existing test to reflect behavior change.
+
+        * media/track/w3c/interfaces/TextTrack/kind.html:
+        Re-sync test from W3C as it was outdated.
+
 2016-09-11  Gyuyoung Kim  <[email protected]>
 
         [EFL] Skip to test some w3c/web-platform-tests

Modified: trunk/LayoutTests/imported/w3c/ChangeLog (205790 => 205791)


--- trunk/LayoutTests/imported/w3c/ChangeLog	2016-09-11 18:11:42 UTC (rev 205790)
+++ trunk/LayoutTests/imported/w3c/ChangeLog	2016-09-11 22:30:05 UTC (rev 205791)
@@ -1,3 +1,16 @@
+2016-09-11  Chris Dumez  <[email protected]>
+
+        HTMLTrackElement.kind's invalid value default should be the metadata state
+        https://bugs.webkit.org/show_bug.cgi?id=161840
+
+        Reviewed by Eric Carlson.
+
+        Rebaseline existing tests now that more checks are passing.
+
+        * web-platform-tests/html/dom/reflection-embedded-expected.txt:
+        * web-platform-tests/html/semantics/embedded-content/media-elements/interfaces/HTMLElement/HTMLTrackElement/kind-expected.txt:
+        * web-platform-tests/html/semantics/embedded-content/media-elements/interfaces/TextTrack/kind-expected.txt:
+
 2016-09-09  Jer Noble  <[email protected]>
 
         [Media Source] Import updated w3c/web-platform-tests and rebaseline

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/html/dom/reflection-embedded-expected.txt (205790 => 205791)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/dom/reflection-embedded-expected.txt	2016-09-11 18:11:42 UTC (rev 205790)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/dom/reflection-embedded-expected.txt	2016-09-11 22:30:05 UTC (rev 205791)
@@ -11822,73 +11822,73 @@
 PASS track.kind: typeof IDL attribute 
 PASS track.kind: IDL get with DOM attribute unset 
 PASS track.kind: setAttribute() to "" followed by getAttribute() 
-FAIL track.kind: setAttribute() to "" followed by IDL get assert_equals: expected "metadata" but got "subtitles"
+PASS track.kind: setAttribute() to "" followed by IDL get 
 PASS track.kind: setAttribute() to " \0\x01\x02\x03\x04\x05\x06\x07 \b\t\n\v\f\r\x0e\x0f \x10\x11\x12\x13\x14\x15\x16\x17 \x18\x19\x1a\x1b\x1c\x1d\x1e\x1f  foo " followed by getAttribute() 
-FAIL track.kind: setAttribute() to " \0\x01\x02\x03\x04\x05\x06\x07 \b\t\n\v\f\r\x0e\x0f \x10\x11\x12\x13\x14\x15\x16\x17 \x18\x19\x1a\x1b\x1c\x1d\x1e\x1f  foo " followed by IDL get assert_equals: expected "metadata" but got "subtitles"
+PASS track.kind: setAttribute() to " \0\x01\x02\x03\x04\x05\x06\x07 \b\t\n\v\f\r\x0e\x0f \x10\x11\x12\x13\x14\x15\x16\x17 \x18\x19\x1a\x1b\x1c\x1d\x1e\x1f  foo " followed by IDL get 
 PASS track.kind: setAttribute() to undefined followed by getAttribute() 
-FAIL track.kind: setAttribute() to undefined followed by IDL get assert_equals: expected "metadata" but got "subtitles"
+PASS track.kind: setAttribute() to undefined followed by IDL get 
 PASS track.kind: setAttribute() to 7 followed by getAttribute() 
-FAIL track.kind: setAttribute() to 7 followed by IDL get assert_equals: expected "metadata" but got "subtitles"
+PASS track.kind: setAttribute() to 7 followed by IDL get 
 PASS track.kind: setAttribute() to 1.5 followed by getAttribute() 
-FAIL track.kind: setAttribute() to 1.5 followed by IDL get assert_equals: expected "metadata" but got "subtitles"
+PASS track.kind: setAttribute() to 1.5 followed by IDL get 
 PASS track.kind: setAttribute() to true followed by getAttribute() 
-FAIL track.kind: setAttribute() to true followed by IDL get assert_equals: expected "metadata" but got "subtitles"
+PASS track.kind: setAttribute() to true followed by IDL get 
 PASS track.kind: setAttribute() to false followed by getAttribute() 
-FAIL track.kind: setAttribute() to false followed by IDL get assert_equals: expected "metadata" but got "subtitles"
+PASS track.kind: setAttribute() to false followed by IDL get 
 PASS track.kind: setAttribute() to object "[object Object]" followed by getAttribute() 
-FAIL track.kind: setAttribute() to object "[object Object]" followed by IDL get assert_equals: expected "metadata" but got "subtitles"
+PASS track.kind: setAttribute() to object "[object Object]" followed by IDL get 
 PASS track.kind: setAttribute() to NaN followed by getAttribute() 
-FAIL track.kind: setAttribute() to NaN followed by IDL get assert_equals: expected "metadata" but got "subtitles"
+PASS track.kind: setAttribute() to NaN followed by IDL get 
 PASS track.kind: setAttribute() to Infinity followed by getAttribute() 
-FAIL track.kind: setAttribute() to Infinity followed by IDL get assert_equals: expected "metadata" but got "subtitles"
+PASS track.kind: setAttribute() to Infinity followed by IDL get 
 PASS track.kind: setAttribute() to -Infinity followed by getAttribute() 
-FAIL track.kind: setAttribute() to -Infinity followed by IDL get assert_equals: expected "metadata" but got "subtitles"
+PASS track.kind: setAttribute() to -Infinity followed by IDL get 
 PASS track.kind: setAttribute() to "\0" followed by getAttribute() 
-FAIL track.kind: setAttribute() to "\0" followed by IDL get assert_equals: expected "metadata" but got "subtitles"
+PASS track.kind: setAttribute() to "\0" followed by IDL get 
 PASS track.kind: setAttribute() to null followed by getAttribute() 
-FAIL track.kind: setAttribute() to null followed by IDL get assert_equals: expected "metadata" but got "subtitles"
+PASS track.kind: setAttribute() to null followed by IDL get 
 PASS track.kind: setAttribute() to object "test-toString" followed by getAttribute() 
-FAIL track.kind: setAttribute() to object "test-toString" followed by IDL get assert_equals: expected "metadata" but got "subtitles"
+PASS track.kind: setAttribute() to object "test-toString" followed by IDL get 
 PASS track.kind: setAttribute() to object "test-valueOf" followed by getAttribute() 
-FAIL track.kind: setAttribute() to object "test-valueOf" followed by IDL get assert_equals: expected "metadata" but got "subtitles"
+PASS track.kind: setAttribute() to object "test-valueOf" followed by IDL get 
 PASS track.kind: setAttribute() to "subtitles" followed by getAttribute() 
 PASS track.kind: setAttribute() to "subtitles" followed by IDL get 
 PASS track.kind: setAttribute() to "xsubtitles" followed by getAttribute() 
-FAIL track.kind: setAttribute() to "xsubtitles" followed by IDL get assert_equals: expected "metadata" but got "subtitles"
+PASS track.kind: setAttribute() to "xsubtitles" followed by IDL get 
 PASS track.kind: setAttribute() to "subtitles\0" followed by getAttribute() 
-FAIL track.kind: setAttribute() to "subtitles\0" followed by IDL get assert_equals: expected "metadata" but got "subtitles"
+PASS track.kind: setAttribute() to "subtitles\0" followed by IDL get 
 PASS track.kind: setAttribute() to "ubtitles" followed by getAttribute() 
-FAIL track.kind: setAttribute() to "ubtitles" followed by IDL get assert_equals: expected "metadata" but got "subtitles"
+PASS track.kind: setAttribute() to "ubtitles" followed by IDL get 
 PASS track.kind: setAttribute() to "SUBTITLES" followed by getAttribute() 
 PASS track.kind: setAttribute() to "SUBTITLES" followed by IDL get 
 PASS track.kind: setAttribute() to "captions" followed by getAttribute() 
 PASS track.kind: setAttribute() to "captions" followed by IDL get 
 PASS track.kind: setAttribute() to "xcaptions" followed by getAttribute() 
-FAIL track.kind: setAttribute() to "xcaptions" followed by IDL get assert_equals: expected "metadata" but got "captions"
+PASS track.kind: setAttribute() to "xcaptions" followed by IDL get 
 PASS track.kind: setAttribute() to "captions\0" followed by getAttribute() 
-FAIL track.kind: setAttribute() to "captions\0" followed by IDL get assert_equals: expected "metadata" but got "captions"
+PASS track.kind: setAttribute() to "captions\0" followed by IDL get 
 PASS track.kind: setAttribute() to "aptions" followed by getAttribute() 
-FAIL track.kind: setAttribute() to "aptions" followed by IDL get assert_equals: expected "metadata" but got "captions"
+PASS track.kind: setAttribute() to "aptions" followed by IDL get 
 PASS track.kind: setAttribute() to "CAPTIONS" followed by getAttribute() 
 PASS track.kind: setAttribute() to "CAPTIONS" followed by IDL get 
 PASS track.kind: setAttribute() to "descriptions" followed by getAttribute() 
 PASS track.kind: setAttribute() to "descriptions" followed by IDL get 
 PASS track.kind: setAttribute() to "xdescriptions" followed by getAttribute() 
-FAIL track.kind: setAttribute() to "xdescriptions" followed by IDL get assert_equals: expected "metadata" but got "descriptions"
+PASS track.kind: setAttribute() to "xdescriptions" followed by IDL get 
 PASS track.kind: setAttribute() to "descriptions\0" followed by getAttribute() 
-FAIL track.kind: setAttribute() to "descriptions\0" followed by IDL get assert_equals: expected "metadata" but got "descriptions"
+PASS track.kind: setAttribute() to "descriptions\0" followed by IDL get 
 PASS track.kind: setAttribute() to "escriptions" followed by getAttribute() 
-FAIL track.kind: setAttribute() to "escriptions" followed by IDL get assert_equals: expected "metadata" but got "descriptions"
+PASS track.kind: setAttribute() to "escriptions" followed by IDL get 
 PASS track.kind: setAttribute() to "DESCRIPTIONS" followed by getAttribute() 
 PASS track.kind: setAttribute() to "DESCRIPTIONS" followed by IDL get 
 PASS track.kind: setAttribute() to "chapters" followed by getAttribute() 
 PASS track.kind: setAttribute() to "chapters" followed by IDL get 
 PASS track.kind: setAttribute() to "xchapters" followed by getAttribute() 
-FAIL track.kind: setAttribute() to "xchapters" followed by IDL get assert_equals: expected "metadata" but got "chapters"
+PASS track.kind: setAttribute() to "xchapters" followed by IDL get 
 PASS track.kind: setAttribute() to "chapters\0" followed by getAttribute() 
-FAIL track.kind: setAttribute() to "chapters\0" followed by IDL get assert_equals: expected "metadata" but got "chapters"
+PASS track.kind: setAttribute() to "chapters\0" followed by IDL get 
 PASS track.kind: setAttribute() to "hapters" followed by getAttribute() 
-FAIL track.kind: setAttribute() to "hapters" followed by IDL get assert_equals: expected "metadata" but got "chapters"
+PASS track.kind: setAttribute() to "hapters" followed by IDL get 
 PASS track.kind: setAttribute() to "CHAPTERS" followed by getAttribute() 
 PASS track.kind: setAttribute() to "CHAPTERS" followed by IDL get 
 PASS track.kind: setAttribute() to "metadata" followed by getAttribute() 
@@ -11950,13 +11950,13 @@
 PASS track.kind: IDL set to "subtitles" followed by IDL get 
 PASS track.kind: IDL set to "xsubtitles" should not throw 
 PASS track.kind: IDL set to "xsubtitles" followed by getAttribute() 
-FAIL track.kind: IDL set to "xsubtitles" followed by IDL get assert_equals: expected "metadata" but got "subtitles"
+PASS track.kind: IDL set to "xsubtitles" followed by IDL get 
 PASS track.kind: IDL set to "subtitles\0" should not throw 
 PASS track.kind: IDL set to "subtitles\0" followed by getAttribute() 
-FAIL track.kind: IDL set to "subtitles\0" followed by IDL get assert_equals: expected "metadata" but got "subtitles"
+PASS track.kind: IDL set to "subtitles\0" followed by IDL get 
 PASS track.kind: IDL set to "ubtitles" should not throw 
 PASS track.kind: IDL set to "ubtitles" followed by getAttribute() 
-FAIL track.kind: IDL set to "ubtitles" followed by IDL get assert_equals: expected "metadata" but got "subtitles"
+PASS track.kind: IDL set to "ubtitles" followed by IDL get 
 PASS track.kind: IDL set to "SUBTITLES" should not throw 
 PASS track.kind: IDL set to "SUBTITLES" followed by getAttribute() 
 PASS track.kind: IDL set to "SUBTITLES" followed by IDL get 
@@ -11965,13 +11965,13 @@
 PASS track.kind: IDL set to "captions" followed by IDL get 
 PASS track.kind: IDL set to "xcaptions" should not throw 
 PASS track.kind: IDL set to "xcaptions" followed by getAttribute() 
-FAIL track.kind: IDL set to "xcaptions" followed by IDL get assert_equals: expected "metadata" but got "captions"
+PASS track.kind: IDL set to "xcaptions" followed by IDL get 
 PASS track.kind: IDL set to "captions\0" should not throw 
 PASS track.kind: IDL set to "captions\0" followed by getAttribute() 
-FAIL track.kind: IDL set to "captions\0" followed by IDL get assert_equals: expected "metadata" but got "captions"
+PASS track.kind: IDL set to "captions\0" followed by IDL get 
 PASS track.kind: IDL set to "aptions" should not throw 
 PASS track.kind: IDL set to "aptions" followed by getAttribute() 
-FAIL track.kind: IDL set to "aptions" followed by IDL get assert_equals: expected "metadata" but got "captions"
+PASS track.kind: IDL set to "aptions" followed by IDL get 
 PASS track.kind: IDL set to "CAPTIONS" should not throw 
 PASS track.kind: IDL set to "CAPTIONS" followed by getAttribute() 
 PASS track.kind: IDL set to "CAPTIONS" followed by IDL get 
@@ -11980,13 +11980,13 @@
 PASS track.kind: IDL set to "descriptions" followed by IDL get 
 PASS track.kind: IDL set to "xdescriptions" should not throw 
 PASS track.kind: IDL set to "xdescriptions" followed by getAttribute() 
-FAIL track.kind: IDL set to "xdescriptions" followed by IDL get assert_equals: expected "metadata" but got "descriptions"
+PASS track.kind: IDL set to "xdescriptions" followed by IDL get 
 PASS track.kind: IDL set to "descriptions\0" should not throw 
 PASS track.kind: IDL set to "descriptions\0" followed by getAttribute() 
-FAIL track.kind: IDL set to "descriptions\0" followed by IDL get assert_equals: expected "metadata" but got "descriptions"
+PASS track.kind: IDL set to "descriptions\0" followed by IDL get 
 PASS track.kind: IDL set to "escriptions" should not throw 
 PASS track.kind: IDL set to "escriptions" followed by getAttribute() 
-FAIL track.kind: IDL set to "escriptions" followed by IDL get assert_equals: expected "metadata" but got "descriptions"
+PASS track.kind: IDL set to "escriptions" followed by IDL get 
 PASS track.kind: IDL set to "DESCRIPTIONS" should not throw 
 PASS track.kind: IDL set to "DESCRIPTIONS" followed by getAttribute() 
 PASS track.kind: IDL set to "DESCRIPTIONS" followed by IDL get 
@@ -11995,13 +11995,13 @@
 PASS track.kind: IDL set to "chapters" followed by IDL get 
 PASS track.kind: IDL set to "xchapters" should not throw 
 PASS track.kind: IDL set to "xchapters" followed by getAttribute() 
-FAIL track.kind: IDL set to "xchapters" followed by IDL get assert_equals: expected "metadata" but got "chapters"
+PASS track.kind: IDL set to "xchapters" followed by IDL get 
 PASS track.kind: IDL set to "chapters\0" should not throw 
 PASS track.kind: IDL set to "chapters\0" followed by getAttribute() 
-FAIL track.kind: IDL set to "chapters\0" followed by IDL get assert_equals: expected "metadata" but got "chapters"
+PASS track.kind: IDL set to "chapters\0" followed by IDL get 
 PASS track.kind: IDL set to "hapters" should not throw 
 PASS track.kind: IDL set to "hapters" followed by getAttribute() 
-FAIL track.kind: IDL set to "hapters" followed by IDL get assert_equals: expected "metadata" but got "chapters"
+PASS track.kind: IDL set to "hapters" followed by IDL get 
 PASS track.kind: IDL set to "CHAPTERS" should not throw 
 PASS track.kind: IDL set to "CHAPTERS" followed by getAttribute() 
 PASS track.kind: IDL set to "CHAPTERS" followed by IDL get 

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/media-elements/interfaces/HTMLElement/HTMLTrackElement/kind-expected.txt (205790 => 205791)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/media-elements/interfaces/HTMLElement/HTMLTrackElement/kind-expected.txt	2016-09-11 18:11:42 UTC (rev 205790)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/media-elements/interfaces/HTMLElement/HTMLTrackElement/kind-expected.txt	2016-09-11 22:30:05 UTC (rev 205791)
@@ -1,15 +1,15 @@
 
 PASS HTMLTrackElement.kind missing value 
-FAIL HTMLTrackElement.kind invalid value in content attribute assert_equals: expected "metadata" but got "subtitles"
+PASS HTMLTrackElement.kind invalid value in content attribute 
 PASS HTMLTrackElement.kind content attribute uppercase 
-FAIL HTMLTrackElement.kind content attribute with uppercase turkish I (with dot) assert_equals: expected "metadata" but got "subtitles"
-FAIL HTMLTrackElement.kind content attribute with lowercase turkish i (dotless) assert_equals: expected "metadata" but got "subtitles"
+PASS HTMLTrackElement.kind content attribute with uppercase turkish I (with dot) 
+PASS HTMLTrackElement.kind content attribute with lowercase turkish i (dotless) 
 PASS HTMLTrackElement.kind content attribute "subtitles" 
 PASS HTMLTrackElement.kind content attribute "captions" 
 PASS HTMLTrackElement.kind content attribute "descriptions" 
 PASS HTMLTrackElement.kind content attribute "chapters" 
 PASS HTMLTrackElement.kind content attribute "metadata" 
-FAIL HTMLTrackElement.kind content attribute "captions\u0000" assert_equals: expected "metadata" but got "subtitles"
+PASS HTMLTrackElement.kind content attribute "captions\u0000" 
 PASS HTMLTrackElement.kind setting IDL attribute to "subtitles" 
 PASS HTMLTrackElement.kind setting IDL attribute to "captions" 
 PASS HTMLTrackElement.kind setting IDL attribute to "descriptions" 
@@ -16,7 +16,7 @@
 PASS HTMLTrackElement.kind setting IDL attribute to "chapters" 
 PASS HTMLTrackElement.kind setting IDL attribute to "metadata" 
 PASS HTMLTrackElement.kind setting IDL attribute to "CAPTIONS" 
-FAIL HTMLTrackElement.kind setting IDL attribute with uppercase turkish I (with dot) assert_equals: expected "metadata" but got "subtitles"
-FAIL HTMLTrackElement.kind setting IDL attribute with lowercase turkish I (dotless) assert_equals: expected "metadata" but got "subtitles"
-FAIL HTMLTrackElement.kind setting IDL attribute with \u0000 assert_equals: expected "metadata" but got "subtitles"
+PASS HTMLTrackElement.kind setting IDL attribute with uppercase turkish I (with dot) 
+PASS HTMLTrackElement.kind setting IDL attribute with lowercase turkish I (dotless) 
+PASS HTMLTrackElement.kind setting IDL attribute with \u0000 
 

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/media-elements/interfaces/TextTrack/kind-expected.txt (205790 => 205791)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/media-elements/interfaces/TextTrack/kind-expected.txt	2016-09-11 18:11:42 UTC (rev 205790)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/media-elements/interfaces/TextTrack/kind-expected.txt	2016-09-11 22:30:05 UTC (rev 205791)
@@ -1,5 +1,5 @@
 
 PASS TextTrack.kind, addTextTrack 
 PASS TextTrack.kind, track element 
-FAIL TextTrack.kind, \u0000 assert_equals: expected "metadata" but got "subtitles"
+PASS TextTrack.kind, \u0000 
 

Modified: trunk/LayoutTests/media/track/track-kind-expected.txt (205790 => 205791)


--- trunk/LayoutTests/media/track/track-kind-expected.txt	2016-09-11 18:11:42 UTC (rev 205790)
+++ trunk/LayoutTests/media/track/track-kind-expected.txt	2016-09-11 22:30:05 UTC (rev 205791)
@@ -11,15 +11,19 @@
 RUN(trackElement.removeAttribute('kind'))
 RUN(trackElement.kind = 'english-metadata')
 EXPECTED (trackElement.getAttribute('kind') == 'english-metadata') OK
-EXPECTED (trackElement.kind == 'subtitles') OK
-EXPECTED (trackElement.track.kind == 'subtitles') OK
+EXPECTED (trackElement.kind == 'metadata') OK
+EXPECTED (trackElement.track.kind == 'metadata') OK
 and via attribute
 RUN(trackElement.removeAttribute('kind'))
 RUN(trackElement.setAttribute('kind', 'english-metadata'))
-EXPECTED (trackElement.kind == 'subtitles') OK
-EXPECTED (trackElement.track.kind == 'subtitles') OK
+EXPECTED (trackElement.kind == 'metadata') OK
+EXPECTED (trackElement.track.kind == 'metadata') OK
 EXPECTED (trackElement.getAttribute('kind') == 'english-metadata') OK
 
+RUN(trackElement.removeAttribute('kind'))
+EXPECTED (trackElement.kind == 'subtitles') OK
+EXPECTED (video.textTracks[0].kind == 'subtitles') OK
+
 *** Set to known values
 ++ 'subtitles'
 set via DOM
@@ -34,7 +38,7 @@
 EXPECTED (trackElement.kind == 'subtitles') OK
 EXPECTED (trackElement.track.kind == 'subtitles') OK
 EXPECTED (trackElement.getAttribute('kind') == 'subtitles') OK
-EXPECTED (textTrackDisplayElement(video, 'display').innerText == 'Lorem ipsum dolor sit amet, ') OK
+No text track cue with display id '-webkit-media-text-track-display' is currently visible
 
 ++ 'captions'
 set via DOM
@@ -49,7 +53,7 @@
 EXPECTED (trackElement.kind == 'captions') OK
 EXPECTED (trackElement.track.kind == 'captions') OK
 EXPECTED (trackElement.getAttribute('kind') == 'captions') OK
-EXPECTED (textTrackDisplayElement(video, 'display').innerText == 'Lorem ipsum dolor sit amet, ') OK
+No text track cue with display id '-webkit-media-text-track-display' is currently visible
 
 ++ 'descriptions'
 set via DOM

Modified: trunk/LayoutTests/media/track/track-kind.html (205790 => 205791)


--- trunk/LayoutTests/media/track/track-kind.html	2016-09-11 18:11:42 UTC (rev 205790)
+++ trunk/LayoutTests/media/track/track-kind.html	2016-09-11 22:30:05 UTC (rev 205791)
@@ -42,16 +42,21 @@
                 run("trackElement.removeAttribute('kind')");
                 run("trackElement.kind = '" + value + "'");
                 testExpected("trackElement.getAttribute('kind')", value);
-                testExpected("trackElement.kind", "subtitles");
-                testExpected("trackElement.track.kind", "subtitles");
+                testExpected("trackElement.kind", "metadata");
+                testExpected("trackElement.track.kind", "metadata");
                 consoleWrite("<b> and via attribute</b>");
                 run("trackElement.removeAttribute('kind')");
                 run("trackElement.setAttribute('kind', '" + value + "')");
-                testExpected("trackElement.kind", "subtitles");
-                testExpected("trackElement.track.kind", "subtitles");
+                testExpected("trackElement.kind", "metadata");
+                testExpected("trackElement.track.kind", "metadata");
                 testExpected("trackElement.getAttribute('kind')", value);
                 consoleWrite("");
 
+                run("trackElement.removeAttribute('kind')");
+                testExpected("trackElement.kind", "subtitles");
+                testExpected("video.textTracks[0].kind", "subtitles");
+                consoleWrite("");
+
                 consoleWrite("<b>*** Set to known values</b>");
                 setKind("subtitles");
 

Modified: trunk/LayoutTests/media/track/w3c/interfaces/TextTrack/kind.html (205790 => 205791)


--- trunk/LayoutTests/media/track/w3c/interfaces/TextTrack/kind.html	2016-09-11 18:11:42 UTC (rev 205790)
+++ trunk/LayoutTests/media/track/w3c/interfaces/TextTrack/kind.html	2016-09-11 22:30:05 UTC (rev 205791)
@@ -26,6 +26,6 @@
 test(function(){
     var track = document.createElement('track');
     track.kind = 'captions\u0000';
-    assert_equals(track.track.kind, 'subtitles');
+    assert_equals(track.track.kind, 'metadata');
 }, document.title+', \\u0000');
-</script>
\ No newline at end of file
+</script>

Modified: trunk/LayoutTests/platform/ios-simulator/imported/w3c/web-platform-tests/html/dom/reflection-embedded-expected.txt (205790 => 205791)


--- trunk/LayoutTests/platform/ios-simulator/imported/w3c/web-platform-tests/html/dom/reflection-embedded-expected.txt	2016-09-11 18:11:42 UTC (rev 205790)
+++ trunk/LayoutTests/platform/ios-simulator/imported/w3c/web-platform-tests/html/dom/reflection-embedded-expected.txt	2016-09-11 22:30:05 UTC (rev 205791)
@@ -11822,141 +11822,141 @@
 PASS track.kind: typeof IDL attribute 
 PASS track.kind: IDL get with DOM attribute unset 
 PASS track.kind: setAttribute() to "" followed by getAttribute() 
-FAIL track.kind: setAttribute() to "" followed by IDL get assert_equals: expected "metadata" but got "subtitles"
+PASS track.kind: setAttribute() to "" followed by IDL get 
 PASS track.kind: setAttribute() to " \0\x01\x02\x03\x04\x05\x06\x07 \b\t\n\v\f\r\x0e\x0f \x10\x11\x12\x13\x14\x15\x16\x17 \x18\x19\x1a\x1b\x1c\x1d\x1e\x1f  foo " followed by getAttribute() 
-FAIL track.kind: setAttribute() to " \0\x01\x02\x03\x04\x05\x06\x07 \b\t\n\v\f\r\x0e\x0f \x10\x11\x12\x13\x14\x15\x16\x17 \x18\x19\x1a\x1b\x1c\x1d\x1e\x1f  foo " followed by IDL get assert_equals: expected "metadata" but got "subtitles"
+PASS track.kind: setAttribute() to " \0\x01\x02\x03\x04\x05\x06\x07 \b\t\n\v\f\r\x0e\x0f \x10\x11\x12\x13\x14\x15\x16\x17 \x18\x19\x1a\x1b\x1c\x1d\x1e\x1f  foo " followed by IDL get 
 PASS track.kind: setAttribute() to undefined followed by getAttribute() 
-FAIL track.kind: setAttribute() to undefined followed by IDL get assert_equals: expected "metadata" but got "subtitles"
+PASS track.kind: setAttribute() to undefined followed by IDL get 
 PASS track.kind: setAttribute() to 7 followed by getAttribute() 
-FAIL track.kind: setAttribute() to 7 followed by IDL get assert_equals: expected "metadata" but got "subtitles"
+PASS track.kind: setAttribute() to 7 followed by IDL get 
 PASS track.kind: setAttribute() to 1.5 followed by getAttribute() 
-FAIL track.kind: setAttribute() to 1.5 followed by IDL get assert_equals: expected "metadata" but got "subtitles"
+PASS track.kind: setAttribute() to 1.5 followed by IDL get 
 PASS track.kind: setAttribute() to true followed by getAttribute() 
-FAIL track.kind: setAttribute() to true followed by IDL get assert_equals: expected "metadata" but got "subtitles"
+PASS track.kind: setAttribute() to true followed by IDL get 
 PASS track.kind: setAttribute() to false followed by getAttribute() 
-FAIL track.kind: setAttribute() to false followed by IDL get assert_equals: expected "metadata" but got "subtitles"
+PASS track.kind: setAttribute() to false followed by IDL get 
 PASS track.kind: setAttribute() to object "[object Object]" followed by getAttribute() 
-FAIL track.kind: setAttribute() to object "[object Object]" followed by IDL get assert_equals: expected "metadata" but got "subtitles"
+PASS track.kind: setAttribute() to object "[object Object]" followed by IDL get 
 PASS track.kind: setAttribute() to NaN followed by getAttribute() 
-FAIL track.kind: setAttribute() to NaN followed by IDL get assert_equals: expected "metadata" but got "subtitles"
+PASS track.kind: setAttribute() to NaN followed by IDL get 
 PASS track.kind: setAttribute() to Infinity followed by getAttribute() 
-FAIL track.kind: setAttribute() to Infinity followed by IDL get assert_equals: expected "metadata" but got "subtitles"
+PASS track.kind: setAttribute() to Infinity followed by IDL get 
 PASS track.kind: setAttribute() to -Infinity followed by getAttribute() 
-FAIL track.kind: setAttribute() to -Infinity followed by IDL get assert_equals: expected "metadata" but got "subtitles"
+PASS track.kind: setAttribute() to -Infinity followed by IDL get 
 PASS track.kind: setAttribute() to "\0" followed by getAttribute() 
-FAIL track.kind: setAttribute() to "\0" followed by IDL get assert_equals: expected "metadata" but got "subtitles"
+PASS track.kind: setAttribute() to "\0" followed by IDL get 
 PASS track.kind: setAttribute() to null followed by getAttribute() 
-FAIL track.kind: setAttribute() to null followed by IDL get assert_equals: expected "metadata" but got "subtitles"
+PASS track.kind: setAttribute() to null followed by IDL get 
 PASS track.kind: setAttribute() to object "test-toString" followed by getAttribute() 
-FAIL track.kind: setAttribute() to object "test-toString" followed by IDL get assert_equals: expected "metadata" but got "subtitles"
+PASS track.kind: setAttribute() to object "test-toString" followed by IDL get 
 PASS track.kind: setAttribute() to object "test-valueOf" followed by getAttribute() 
-FAIL track.kind: setAttribute() to object "test-valueOf" followed by IDL get assert_equals: expected "metadata" but got "subtitles"
+PASS track.kind: setAttribute() to object "test-valueOf" followed by IDL get 
 PASS track.kind: setAttribute() to "subtitles" followed by getAttribute() 
 PASS track.kind: setAttribute() to "subtitles" followed by IDL get 
 PASS track.kind: setAttribute() to "xsubtitles" followed by getAttribute() 
-FAIL track.kind: setAttribute() to "xsubtitles" followed by IDL get assert_equals: expected "metadata" but got "subtitles"
+PASS track.kind: setAttribute() to "xsubtitles" followed by IDL get 
 PASS track.kind: setAttribute() to "subtitles\0" followed by getAttribute() 
-FAIL track.kind: setAttribute() to "subtitles\0" followed by IDL get assert_equals: expected "metadata" but got "subtitles"
+PASS track.kind: setAttribute() to "subtitles\0" followed by IDL get 
 PASS track.kind: setAttribute() to "ubtitles" followed by getAttribute() 
-FAIL track.kind: setAttribute() to "ubtitles" followed by IDL get assert_equals: expected "metadata" but got "subtitles"
+PASS track.kind: setAttribute() to "ubtitles" followed by IDL get 
 PASS track.kind: setAttribute() to "SUBTITLES" followed by getAttribute() 
 PASS track.kind: setAttribute() to "SUBTITLES" followed by IDL get 
 PASS track.kind: setAttribute() to "captions" followed by getAttribute() 
 PASS track.kind: setAttribute() to "captions" followed by IDL get 
 PASS track.kind: setAttribute() to "xcaptions" followed by getAttribute() 
-FAIL track.kind: setAttribute() to "xcaptions" followed by IDL get assert_equals: expected "metadata" but got "subtitles"
+PASS track.kind: setAttribute() to "xcaptions" followed by IDL get 
 PASS track.kind: setAttribute() to "captions\0" followed by getAttribute() 
-FAIL track.kind: setAttribute() to "captions\0" followed by IDL get assert_equals: expected "metadata" but got "subtitles"
+PASS track.kind: setAttribute() to "captions\0" followed by IDL get 
 PASS track.kind: setAttribute() to "aptions" followed by getAttribute() 
-FAIL track.kind: setAttribute() to "aptions" followed by IDL get assert_equals: expected "metadata" but got "subtitles"
+PASS track.kind: setAttribute() to "aptions" followed by IDL get 
 PASS track.kind: setAttribute() to "CAPTIONS" followed by getAttribute() 
 PASS track.kind: setAttribute() to "CAPTIONS" followed by IDL get 
 PASS track.kind: setAttribute() to "descriptions" followed by getAttribute() 
 PASS track.kind: setAttribute() to "descriptions" followed by IDL get 
 PASS track.kind: setAttribute() to "xdescriptions" followed by getAttribute() 
-FAIL track.kind: setAttribute() to "xdescriptions" followed by IDL get assert_equals: expected "metadata" but got "subtitles"
+PASS track.kind: setAttribute() to "xdescriptions" followed by IDL get 
 PASS track.kind: setAttribute() to "descriptions\0" followed by getAttribute() 
-FAIL track.kind: setAttribute() to "descriptions\0" followed by IDL get assert_equals: expected "metadata" but got "subtitles"
+PASS track.kind: setAttribute() to "descriptions\0" followed by IDL get 
 PASS track.kind: setAttribute() to "escriptions" followed by getAttribute() 
-FAIL track.kind: setAttribute() to "escriptions" followed by IDL get assert_equals: expected "metadata" but got "subtitles"
+PASS track.kind: setAttribute() to "escriptions" followed by IDL get 
 PASS track.kind: setAttribute() to "DESCRIPTIONS" followed by getAttribute() 
 PASS track.kind: setAttribute() to "DESCRIPTIONS" followed by IDL get 
 PASS track.kind: setAttribute() to "chapters" followed by getAttribute() 
 PASS track.kind: setAttribute() to "chapters" followed by IDL get 
 PASS track.kind: setAttribute() to "xchapters" followed by getAttribute() 
-FAIL track.kind: setAttribute() to "xchapters" followed by IDL get assert_equals: expected "metadata" but got "subtitles"
+PASS track.kind: setAttribute() to "xchapters" followed by IDL get 
 PASS track.kind: setAttribute() to "chapters\0" followed by getAttribute() 
-FAIL track.kind: setAttribute() to "chapters\0" followed by IDL get assert_equals: expected "metadata" but got "subtitles"
+PASS track.kind: setAttribute() to "chapters\0" followed by IDL get 
 PASS track.kind: setAttribute() to "hapters" followed by getAttribute() 
-FAIL track.kind: setAttribute() to "hapters" followed by IDL get assert_equals: expected "metadata" but got "subtitles"
+PASS track.kind: setAttribute() to "hapters" followed by IDL get 
 PASS track.kind: setAttribute() to "CHAPTERS" followed by getAttribute() 
 PASS track.kind: setAttribute() to "CHAPTERS" followed by IDL get 
 PASS track.kind: setAttribute() to "metadata" followed by getAttribute() 
 PASS track.kind: setAttribute() to "metadata" followed by IDL get 
 PASS track.kind: setAttribute() to "xmetadata" followed by getAttribute() 
-FAIL track.kind: setAttribute() to "xmetadata" followed by IDL get assert_equals: expected "metadata" but got "subtitles"
+PASS track.kind: setAttribute() to "xmetadata" followed by IDL get 
 PASS track.kind: setAttribute() to "metadata\0" followed by getAttribute() 
-FAIL track.kind: setAttribute() to "metadata\0" followed by IDL get assert_equals: expected "metadata" but got "subtitles"
+PASS track.kind: setAttribute() to "metadata\0" followed by IDL get 
 PASS track.kind: setAttribute() to "etadata" followed by getAttribute() 
-FAIL track.kind: setAttribute() to "etadata" followed by IDL get assert_equals: expected "metadata" but got "subtitles"
+PASS track.kind: setAttribute() to "etadata" followed by IDL get 
 PASS track.kind: setAttribute() to "METADATA" followed by getAttribute() 
 PASS track.kind: setAttribute() to "METADATA" followed by IDL get 
 PASS track.kind: IDL set to "" should not throw 
 PASS track.kind: IDL set to "" followed by getAttribute() 
-FAIL track.kind: IDL set to "" followed by IDL get assert_equals: expected "metadata" but got "subtitles"
+PASS track.kind: IDL set to "" followed by IDL get 
 PASS track.kind: IDL set to " \0\x01\x02\x03\x04\x05\x06\x07 \b\t\n\v\f\r\x0e\x0f \x10\x11\x12\x13\x14\x15\x16\x17 \x18\x19\x1a\x1b\x1c\x1d\x1e\x1f  foo " should not throw 
 PASS track.kind: IDL set to " \0\x01\x02\x03\x04\x05\x06\x07 \b\t\n\v\f\r\x0e\x0f \x10\x11\x12\x13\x14\x15\x16\x17 \x18\x19\x1a\x1b\x1c\x1d\x1e\x1f  foo " followed by getAttribute() 
-FAIL track.kind: IDL set to " \0\x01\x02\x03\x04\x05\x06\x07 \b\t\n\v\f\r\x0e\x0f \x10\x11\x12\x13\x14\x15\x16\x17 \x18\x19\x1a\x1b\x1c\x1d\x1e\x1f  foo " followed by IDL get assert_equals: expected "metadata" but got "subtitles"
+PASS track.kind: IDL set to " \0\x01\x02\x03\x04\x05\x06\x07 \b\t\n\v\f\r\x0e\x0f \x10\x11\x12\x13\x14\x15\x16\x17 \x18\x19\x1a\x1b\x1c\x1d\x1e\x1f  foo " followed by IDL get 
 PASS track.kind: IDL set to undefined should not throw 
 PASS track.kind: IDL set to undefined followed by getAttribute() 
-FAIL track.kind: IDL set to undefined followed by IDL get assert_equals: expected "metadata" but got "subtitles"
+PASS track.kind: IDL set to undefined followed by IDL get 
 PASS track.kind: IDL set to 7 should not throw 
 PASS track.kind: IDL set to 7 followed by getAttribute() 
-FAIL track.kind: IDL set to 7 followed by IDL get assert_equals: expected "metadata" but got "subtitles"
+PASS track.kind: IDL set to 7 followed by IDL get 
 PASS track.kind: IDL set to 1.5 should not throw 
 PASS track.kind: IDL set to 1.5 followed by getAttribute() 
-FAIL track.kind: IDL set to 1.5 followed by IDL get assert_equals: expected "metadata" but got "subtitles"
+PASS track.kind: IDL set to 1.5 followed by IDL get 
 PASS track.kind: IDL set to true should not throw 
 PASS track.kind: IDL set to true followed by getAttribute() 
-FAIL track.kind: IDL set to true followed by IDL get assert_equals: expected "metadata" but got "subtitles"
+PASS track.kind: IDL set to true followed by IDL get 
 PASS track.kind: IDL set to false should not throw 
 PASS track.kind: IDL set to false followed by getAttribute() 
-FAIL track.kind: IDL set to false followed by IDL get assert_equals: expected "metadata" but got "subtitles"
+PASS track.kind: IDL set to false followed by IDL get 
 PASS track.kind: IDL set to object "[object Object]" should not throw 
 PASS track.kind: IDL set to object "[object Object]" followed by getAttribute() 
-FAIL track.kind: IDL set to object "[object Object]" followed by IDL get assert_equals: expected "metadata" but got "subtitles"
+PASS track.kind: IDL set to object "[object Object]" followed by IDL get 
 PASS track.kind: IDL set to NaN should not throw 
 PASS track.kind: IDL set to NaN followed by getAttribute() 
-FAIL track.kind: IDL set to NaN followed by IDL get assert_equals: expected "metadata" but got "subtitles"
+PASS track.kind: IDL set to NaN followed by IDL get 
 PASS track.kind: IDL set to Infinity should not throw 
 PASS track.kind: IDL set to Infinity followed by getAttribute() 
-FAIL track.kind: IDL set to Infinity followed by IDL get assert_equals: expected "metadata" but got "subtitles"
+PASS track.kind: IDL set to Infinity followed by IDL get 
 PASS track.kind: IDL set to -Infinity should not throw 
 PASS track.kind: IDL set to -Infinity followed by getAttribute() 
-FAIL track.kind: IDL set to -Infinity followed by IDL get assert_equals: expected "metadata" but got "subtitles"
+PASS track.kind: IDL set to -Infinity followed by IDL get 
 PASS track.kind: IDL set to "\0" should not throw 
 PASS track.kind: IDL set to "\0" followed by getAttribute() 
-FAIL track.kind: IDL set to "\0" followed by IDL get assert_equals: expected "metadata" but got "subtitles"
+PASS track.kind: IDL set to "\0" followed by IDL get 
 PASS track.kind: IDL set to null should not throw 
-FAIL track.kind: IDL set to null followed by IDL get assert_equals: expected "metadata" but got "subtitles"
+PASS track.kind: IDL set to null followed by IDL get 
 PASS track.kind: IDL set to object "test-toString" should not throw 
 PASS track.kind: IDL set to object "test-toString" followed by getAttribute() 
-FAIL track.kind: IDL set to object "test-toString" followed by IDL get assert_equals: expected "metadata" but got "subtitles"
+PASS track.kind: IDL set to object "test-toString" followed by IDL get 
 PASS track.kind: IDL set to object "test-valueOf" should not throw 
 PASS track.kind: IDL set to object "test-valueOf" followed by getAttribute() 
-FAIL track.kind: IDL set to object "test-valueOf" followed by IDL get assert_equals: expected "metadata" but got "subtitles"
+PASS track.kind: IDL set to object "test-valueOf" followed by IDL get 
 PASS track.kind: IDL set to "subtitles" should not throw 
 PASS track.kind: IDL set to "subtitles" followed by getAttribute() 
 PASS track.kind: IDL set to "subtitles" followed by IDL get 
 PASS track.kind: IDL set to "xsubtitles" should not throw 
 PASS track.kind: IDL set to "xsubtitles" followed by getAttribute() 
-FAIL track.kind: IDL set to "xsubtitles" followed by IDL get assert_equals: expected "metadata" but got "subtitles"
+PASS track.kind: IDL set to "xsubtitles" followed by IDL get 
 PASS track.kind: IDL set to "subtitles\0" should not throw 
 PASS track.kind: IDL set to "subtitles\0" followed by getAttribute() 
-FAIL track.kind: IDL set to "subtitles\0" followed by IDL get assert_equals: expected "metadata" but got "subtitles"
+PASS track.kind: IDL set to "subtitles\0" followed by IDL get 
 PASS track.kind: IDL set to "ubtitles" should not throw 
 PASS track.kind: IDL set to "ubtitles" followed by getAttribute() 
-FAIL track.kind: IDL set to "ubtitles" followed by IDL get assert_equals: expected "metadata" but got "subtitles"
+PASS track.kind: IDL set to "ubtitles" followed by IDL get 
 PASS track.kind: IDL set to "SUBTITLES" should not throw 
 PASS track.kind: IDL set to "SUBTITLES" followed by getAttribute() 
 PASS track.kind: IDL set to "SUBTITLES" followed by IDL get 
@@ -11965,13 +11965,13 @@
 PASS track.kind: IDL set to "captions" followed by IDL get 
 PASS track.kind: IDL set to "xcaptions" should not throw 
 PASS track.kind: IDL set to "xcaptions" followed by getAttribute() 
-FAIL track.kind: IDL set to "xcaptions" followed by IDL get assert_equals: expected "metadata" but got "subtitles"
+PASS track.kind: IDL set to "xcaptions" followed by IDL get 
 PASS track.kind: IDL set to "captions\0" should not throw 
 PASS track.kind: IDL set to "captions\0" followed by getAttribute() 
-FAIL track.kind: IDL set to "captions\0" followed by IDL get assert_equals: expected "metadata" but got "subtitles"
+PASS track.kind: IDL set to "captions\0" followed by IDL get 
 PASS track.kind: IDL set to "aptions" should not throw 
 PASS track.kind: IDL set to "aptions" followed by getAttribute() 
-FAIL track.kind: IDL set to "aptions" followed by IDL get assert_equals: expected "metadata" but got "subtitles"
+PASS track.kind: IDL set to "aptions" followed by IDL get 
 PASS track.kind: IDL set to "CAPTIONS" should not throw 
 PASS track.kind: IDL set to "CAPTIONS" followed by getAttribute() 
 PASS track.kind: IDL set to "CAPTIONS" followed by IDL get 
@@ -11980,13 +11980,13 @@
 PASS track.kind: IDL set to "descriptions" followed by IDL get 
 PASS track.kind: IDL set to "xdescriptions" should not throw 
 PASS track.kind: IDL set to "xdescriptions" followed by getAttribute() 
-FAIL track.kind: IDL set to "xdescriptions" followed by IDL get assert_equals: expected "metadata" but got "subtitles"
+PASS track.kind: IDL set to "xdescriptions" followed by IDL get 
 PASS track.kind: IDL set to "descriptions\0" should not throw 
 PASS track.kind: IDL set to "descriptions\0" followed by getAttribute() 
-FAIL track.kind: IDL set to "descriptions\0" followed by IDL get assert_equals: expected "metadata" but got "subtitles"
+PASS track.kind: IDL set to "descriptions\0" followed by IDL get 
 PASS track.kind: IDL set to "escriptions" should not throw 
 PASS track.kind: IDL set to "escriptions" followed by getAttribute() 
-FAIL track.kind: IDL set to "escriptions" followed by IDL get assert_equals: expected "metadata" but got "subtitles"
+PASS track.kind: IDL set to "escriptions" followed by IDL get 
 PASS track.kind: IDL set to "DESCRIPTIONS" should not throw 
 PASS track.kind: IDL set to "DESCRIPTIONS" followed by getAttribute() 
 PASS track.kind: IDL set to "DESCRIPTIONS" followed by IDL get 
@@ -11995,13 +11995,13 @@
 PASS track.kind: IDL set to "chapters" followed by IDL get 
 PASS track.kind: IDL set to "xchapters" should not throw 
 PASS track.kind: IDL set to "xchapters" followed by getAttribute() 
-FAIL track.kind: IDL set to "xchapters" followed by IDL get assert_equals: expected "metadata" but got "subtitles"
+PASS track.kind: IDL set to "xchapters" followed by IDL get 
 PASS track.kind: IDL set to "chapters\0" should not throw 
 PASS track.kind: IDL set to "chapters\0" followed by getAttribute() 
-FAIL track.kind: IDL set to "chapters\0" followed by IDL get assert_equals: expected "metadata" but got "subtitles"
+PASS track.kind: IDL set to "chapters\0" followed by IDL get 
 PASS track.kind: IDL set to "hapters" should not throw 
 PASS track.kind: IDL set to "hapters" followed by getAttribute() 
-FAIL track.kind: IDL set to "hapters" followed by IDL get assert_equals: expected "metadata" but got "subtitles"
+PASS track.kind: IDL set to "hapters" followed by IDL get 
 PASS track.kind: IDL set to "CHAPTERS" should not throw 
 PASS track.kind: IDL set to "CHAPTERS" followed by getAttribute() 
 PASS track.kind: IDL set to "CHAPTERS" followed by IDL get 
@@ -12010,13 +12010,13 @@
 PASS track.kind: IDL set to "metadata" followed by IDL get 
 PASS track.kind: IDL set to "xmetadata" should not throw 
 PASS track.kind: IDL set to "xmetadata" followed by getAttribute() 
-FAIL track.kind: IDL set to "xmetadata" followed by IDL get assert_equals: expected "metadata" but got "subtitles"
+PASS track.kind: IDL set to "xmetadata" followed by IDL get 
 PASS track.kind: IDL set to "metadata\0" should not throw 
 PASS track.kind: IDL set to "metadata\0" followed by getAttribute() 
-FAIL track.kind: IDL set to "metadata\0" followed by IDL get assert_equals: expected "metadata" but got "subtitles"
+PASS track.kind: IDL set to "metadata\0" followed by IDL get 
 PASS track.kind: IDL set to "etadata" should not throw 
 PASS track.kind: IDL set to "etadata" followed by getAttribute() 
-FAIL track.kind: IDL set to "etadata" followed by IDL get assert_equals: expected "metadata" but got "subtitles"
+PASS track.kind: IDL set to "etadata" followed by IDL get 
 PASS track.kind: IDL set to "METADATA" should not throw 
 PASS track.kind: IDL set to "METADATA" followed by getAttribute() 
 PASS track.kind: IDL set to "METADATA" followed by IDL get 

Modified: trunk/Source/WebCore/ChangeLog (205790 => 205791)


--- trunk/Source/WebCore/ChangeLog	2016-09-11 18:11:42 UTC (rev 205790)
+++ trunk/Source/WebCore/ChangeLog	2016-09-11 22:30:05 UTC (rev 205791)
@@ -1,3 +1,21 @@
+2016-09-11  Chris Dumez  <[email protected]>
+
+        HTMLTrackElement.kind's invalid value default should be the metadata state
+        https://bugs.webkit.org/show_bug.cgi?id=161840
+
+        Reviewed by Eric Carlson.
+
+        HTMLTrackElement.kind's invalid value default should be the metadata state,
+        not the subtitles state:
+        - https://html.spec.whatwg.org/#attr-track-kind
+
+        Chrome agrees with the specification.
+
+        No new tests, rebaselined existing tests.
+
+        * html/track/TextTrack.cpp:
+        (WebCore::TextTrack::setKindKeywordIgnoringASCIICase):
+
 2016-09-11  Dave Hyatt  <[email protected]>
 
         [CSS Parser] Add the main parser implementation

Modified: trunk/Source/WebCore/html/track/TextTrack.cpp (205790 => 205791)


--- trunk/Source/WebCore/html/track/TextTrack.cpp	2016-09-11 18:11:42 UTC (rev 205790)
+++ trunk/Source/WebCore/html/track/TextTrack.cpp	2016-09-11 22:30:05 UTC (rev 205791)
@@ -202,6 +202,11 @@
 
 void TextTrack::setKindKeywordIgnoringASCIICase(StringView keyword)
 {
+    if (keyword.isNull()) {
+        // The missing value default is the subtitles state.
+        setKind(Kind::Subtitles);
+        return;
+    }
     if (equalLettersIgnoringASCIICase(keyword, "captions"))
         setKind(Kind::Captions);
     else if (equalLettersIgnoringASCIICase(keyword, "chapters"))
@@ -214,14 +219,10 @@
         setKind(Kind::Metadata);
     else if (equalLettersIgnoringASCIICase(keyword, "subtitles"))
         setKind(Kind::Subtitles);
-#if !ENABLE(MEDIA_SOURCE)
-    // FIXME: This preserves the behavior of an older version of this code before refactoring.
-    // !ENABLE(MEDIA_SOURCE): unknown keywords all get turned into Subtitles.
-    // ENABLE(MEDIA_SOURCE): unknown keywords leave the old value for kind untouched.
-    // I am not sure that either of those is the correct behavior; should test and fix.
-    else
-        setKind(Kind::Subtitles);
-#endif
+    else {
+        // The invalid value default is the metadata state.
+        setKind(Kind::Metadata);
+    }
 }
 
 void TextTrack::setMode(Mode mode)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to