Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(168)

Side by Side Diff: third_party/WebKit/LayoutTests/media/track/opera/interfaces/HTMLElement/HTMLTrackElement/kind.html

Issue 1947033002: Change "invalid value default" for HTMLTrackElement 'kind' to "metadata" (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 <!doctype html> 1 <!doctype html>
2 <title>HTMLTrackElement.kind</title> 2 <title>HTMLTrackElement.kind</title>
3 <script src=../../../../../../resources/testharness.js></script> 3 <script src=../../../../../../resources/testharness.js></script>
4 <script src=../../../../../../resources/testharnessreport.js></script> 4 <script src=../../../../../../resources/testharnessreport.js></script>
5 <div id=log></div> 5 <div id=log></div>
6 <script> 6 <script>
7 test(function(){ 7 test(function(){
8 var track = document.createElement('track'); 8 var track = document.createElement('track');
9 assert_equals(track.kind, 'subtitles'); 9 assert_equals(track.kind, 'subtitles');
10 assert_equals(track.getAttribute('kind'), null); 10 assert_equals(track.getAttribute('kind'), null);
11 }, document.title + ' missing value'); 11 }, document.title + ' missing value');
12 12
13 test(function(){ 13 test(function(){
14 var track = document.createElement('track'); 14 var track = document.createElement('track');
15 track.setAttribute('kind', 'invalid'); 15 track.setAttribute('kind', 'invalid');
16 assert_equals(track.kind, 'subtitles'); 16 assert_equals(track.kind, 'metadata');
17 assert_equals(track.getAttribute('kind'), 'invalid'); 17 assert_equals(track.getAttribute('kind'), 'invalid');
18 }, document.title + ' invalid value in content attribute'); 18 }, document.title + ' invalid value in content attribute');
19 19
20 test(function(){ 20 test(function(){
21 var track = document.createElement('track'); 21 var track = document.createElement('track');
22 track.setAttribute('kind', 'CAPTIONS'); 22 track.setAttribute('kind', 'CAPTIONS');
23 assert_equals(track.kind, 'captions'); 23 assert_equals(track.kind, 'captions');
24 assert_equals(track.getAttribute('kind'), 'CAPTIONS'); 24 assert_equals(track.getAttribute('kind'), 'CAPTIONS');
25 }, document.title + ' content attribute uppercase'); 25 }, document.title + ' content attribute uppercase');
26 26
27 test(function(){ 27 test(function(){
28 var track = document.createElement('track'); 28 var track = document.createElement('track');
29 track.setAttribute('kind', 'CAPT\u0130ONS'); 29 track.setAttribute('kind', 'CAPT\u0130ONS');
30 assert_equals(track.kind, 'subtitles'); 30 assert_equals(track.kind, 'metadata');
31 assert_equals(track.getAttribute('kind'), 'CAPT\u0130ONS'); 31 assert_equals(track.getAttribute('kind'), 'CAPT\u0130ONS');
32 }, document.title + ' content attribute with uppercase turkish I (with dot)'); 32 }, document.title + ' content attribute with uppercase turkish I (with dot)');
33 33
34 test(function(){ 34 test(function(){
35 var track = document.createElement('track'); 35 var track = document.createElement('track');
36 track.setAttribute('kind', 'capt\u0131ons'); 36 track.setAttribute('kind', 'capt\u0131ons');
37 assert_equals(track.kind, 'subtitles'); 37 assert_equals(track.kind, 'metadata');
38 assert_equals(track.getAttribute('kind'), 'capt\u0131ons'); 38 assert_equals(track.getAttribute('kind'), 'capt\u0131ons');
39 }, document.title + ' content attribute with lowercase turkish i (dotless)'); 39 }, document.title + ' content attribute with lowercase turkish i (dotless)');
40 40
41 test(function(){ 41 test(function(){
42 var track = document.createElement('track'); 42 var track = document.createElement('track');
43 track.setAttribute('kind', 'subtitles'); 43 track.setAttribute('kind', 'subtitles');
44 assert_equals(track.kind, 'subtitles'); 44 assert_equals(track.kind, 'subtitles');
45 assert_equals(track.getAttribute('kind'), 'subtitles'); 45 assert_equals(track.getAttribute('kind'), 'subtitles');
46 }, document.title + ' content attribute "subtitles"'); 46 }, document.title + ' content attribute "subtitles"');
47 47
(...skipping 21 matching lines...) Expand all
69 test(function(){ 69 test(function(){
70 var track = document.createElement('track'); 70 var track = document.createElement('track');
71 track.setAttribute('kind', 'metadata'); 71 track.setAttribute('kind', 'metadata');
72 assert_equals(track.kind, 'metadata'); 72 assert_equals(track.kind, 'metadata');
73 assert_equals(track.getAttribute('kind'), 'metadata'); 73 assert_equals(track.getAttribute('kind'), 'metadata');
74 }, document.title + ' content attribute "metadata"'); 74 }, document.title + ' content attribute "metadata"');
75 75
76 test(function(){ 76 test(function(){
77 var track = document.createElement('track'); 77 var track = document.createElement('track');
78 track.setAttribute('kind', 'captions\u0000'); 78 track.setAttribute('kind', 'captions\u0000');
79 assert_equals(track.kind, 'subtitles'); 79 assert_equals(track.kind, 'metadata');
80 assert_equals(track.getAttribute('kind'), 'captions\u0000'); 80 assert_equals(track.getAttribute('kind'), 'captions\u0000');
81 }, document.title + ' content attribute "captions\\u0000"'); 81 }, document.title + ' content attribute "captions\\u0000"');
82 82
83 test(function(){ 83 test(function(){
84 var track = document.createElement('track'); 84 var track = document.createElement('track');
85 track.kind = 'subtitles'; 85 track.kind = 'subtitles';
86 assert_equals(track.getAttribute('kind'), 'subtitles'); 86 assert_equals(track.getAttribute('kind'), 'subtitles');
87 assert_equals(track.kind, 'subtitles'); 87 assert_equals(track.kind, 'subtitles');
88 }, document.title + ' setting IDL attribute to "subtitles"'); 88 }, document.title + ' setting IDL attribute to "subtitles"');
89 89
(...skipping 29 matching lines...) Expand all
119 var track = document.createElement('track'); 119 var track = document.createElement('track');
120 track.kind = 'CAPTIONS'; 120 track.kind = 'CAPTIONS';
121 assert_equals(track.getAttribute('kind'), 'CAPTIONS'); 121 assert_equals(track.getAttribute('kind'), 'CAPTIONS');
122 assert_equals(track.kind, 'captions'); 122 assert_equals(track.kind, 'captions');
123 }, document.title + ' setting IDL attribute to "CAPTIONS"'); 123 }, document.title + ' setting IDL attribute to "CAPTIONS"');
124 124
125 test(function(){ 125 test(function(){
126 var track = document.createElement('track'); 126 var track = document.createElement('track');
127 track.kind = 'CAPT\u0130ONS'; 127 track.kind = 'CAPT\u0130ONS';
128 assert_equals(track.getAttribute('kind'), 'CAPT\u0130ONS'); 128 assert_equals(track.getAttribute('kind'), 'CAPT\u0130ONS');
129 assert_equals(track.kind, 'subtitles'); 129 assert_equals(track.kind, 'metadata');
130 }, document.title + ' setting IDL attribute with uppercase turkish I (with dot)' ); 130 }, document.title + ' setting IDL attribute with uppercase turkish I (with dot)' );
131 131
132 test(function(){ 132 test(function(){
133 var track = document.createElement('track'); 133 var track = document.createElement('track');
134 track.kind = 'capt\u0131ons'; 134 track.kind = 'capt\u0131ons';
135 assert_equals(track.getAttribute('kind'), 'capt\u0131ons'); 135 assert_equals(track.getAttribute('kind'), 'capt\u0131ons');
136 assert_equals(track.kind, 'subtitles'); 136 assert_equals(track.kind, 'metadata');
137 }, document.title + ' setting IDL attribute with lowercase turkish I (dotless)') ; 137 }, document.title + ' setting IDL attribute with lowercase turkish I (dotless)') ;
138 138
139 test(function(){ 139 test(function(){
140 var track = document.createElement('track'); 140 var track = document.createElement('track');
141 track.kind = 'captions\u0000'; 141 track.kind = 'captions\u0000';
142 assert_equals(track.getAttribute('kind'), 'captions\u0000'); 142 assert_equals(track.getAttribute('kind'), 'captions\u0000');
143 assert_equals(track.kind, 'subtitles'); 143 assert_equals(track.kind, 'metadata');
144 }, document.title + ' setting IDL attribute with \\u0000'); 144 }, document.title + ' setting IDL attribute with \\u0000');
145 145
146 </script> 146 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698