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

Side by Side Diff: third_party/WebKit/LayoutTests/media/media-fragments/media-fragments.js

Issue 2103003002: Remove unneeded TODOs from media-fragment tests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix Created 4 years, 5 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
« no previous file with comments | « third_party/WebKit/LayoutTests/media/media-fragments/TC0001-expected.txt ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 1
2 var currentTest = null; 2 function test_media_fragment() {
3 var fragmentEndTime; 3 async_test(function(t) {
4 var testData = 4 var currentTest = null;
5 { 5 var fragmentEndTime;
6 // http://www.w3.org/2008/WebVideo/Fragments/TC/ua-test-cases 6 var testData = {
7 // http://www.w3.org/2008/WebVideo/Fragments/TC/ua-test-cases
7 8
8 TC0001 : { start: null, end: null, valid: false, description: "#t=,", fr agment: "t=,", comment: "Syntax error, not allowed according to the ABNF. The me dia fragment is ignored."}, 9 TC0001 : { start: null, end: null, valid: false, description: "#t=," , fragment: "t=,", comment: "Syntax error, not allowed according to the ABNF. Th e media fragment is ignored."},
9 TC0002 : { start: null, end: null, valid: false, description: "#t=a,a an d a >= 0", fragment: "t=3,3", comment: "Invalid semantics: start must be smaller than end. The media fragment is ignored."}, 10 TC0002 : { start: null, end: null, valid: false, description: "#t=a, a and a >= 0", fragment: "t=3,3", comment: "Invalid semantics: start must be sma ller than end. The media fragment is ignored."},
10 TC0003 : { start: null, end: null, valid: false, description: "#t=a,b an d a > b", fragment: "t=7,3", comment: "Invalid semantics: the requested interval 's start is beyond its end. The media fragment is ignored."}, 11 TC0003 : { start: null, end: null, valid: false, description: "#t=a, b and a > b", fragment: "t=7,3", comment: "Invalid semantics: the requested inte rval's start is beyond its end. The media fragment is ignored."},
11 TC0004 : { start: null, end: null, valid: true, description: "#t=a,b and a = 0, b = e", fragment: "t=0,9.97", comment: "The media is requested from 0 to e."}, 12 TC0004 : { start: null, end: null, valid: true, description: "#t=a,b and a = 0, b = e", fragment: "t=0,9.97", comment: "The media is requested from 0 to e."},
12 TC0005 : { start: 3, end: 7, valid: true, description: "#t=a,b and a >= 0, a < b, a < e and b <= e", fragment: "t=3,7", comment: "The media is requested from a to b."}, 13 TC0005 : { start: 3, end: 7, valid: true, description: "#t=a,b and a >= 0, a < b, a < e and b <= e", fragment: "t=3,7", comment: "The media is reque sted from a to b."},
13 TC0006 : { start: 3, end: null, valid: true, description: "#t=a,b and a >= 0, a < b, a < e and b > e", fragment: "t=3,15", comment: "The media is reques ted from a to e."}, 14 TC0006 : { start: 3, end: null, valid: true, description: "#t=a,b an d a >= 0, a < b, a < e and b > e", fragment: "t=3,15", comment: "The media is re quested from a to e."},
14 TC0009 : { start: "duration", end: null, valid: false, description: "#t= a,b and a < b and a >= e", fragment: "t=15,20", comment: "The request lies beyon d the end of the resource. If the UA knows the duration of the resource, it seek s to the end of the media resource. Otherwise, the UA will send an (out-of-range ) HTTP request with an 'include-setup' in order to setup its decoding pipeline." }, 15 TC0009 : { start: "duration", end: null, valid: false, description: "#t=a,b and a < b and a >= e", fragment: "t=15,20", comment: "The request lies b eyond the end of the resource. If the UA knows the duration of the resource, it seeks to the end of the media resource. Otherwise, the UA will send an (out-of-r ange) HTTP request with an 'include-setup' in order to setup its decoding pipeli ne."},
15 TC0011 : { start: 3, end: null, valid: true, description: "#t=a with a > = 0, a < e", fragment: "t=3", comment: "Equivalent to #t=a,e. The media is reque sted from a to e."}, 16 TC0011 : { start: 3, end: null, valid: true, description: "#t=a with a >= 0, a < e", fragment: "t=3", comment: "Equivalent to #t=a,e. The media is r equested from a to e."},
16 TC0012 : { start: null, end: null, valid: false, description: "#t=a, wit h a >= 0, a < e", fragment: "t=3,", comment: "Invalid syntax, hence the temporal fragment is ignored."}, 17 TC0012 : { start: null, end: null, valid: false, description: "#t=a, with a >= 0, a < e", fragment: "t=3,", comment: "Invalid syntax, hence the temp oral fragment is ignored."},
17 TC0014 : { start: "duration", end: null, valid: false, description: "#t= a with a >= e", fragment: "t=15", comment: "The request lies beyond the end of t he resource. If the UA knows the duration of the resource, it seeks to the end o f the media resource. Otherwise, the UA will send an (out-of-range) HTTP request with an 'include-setup' in order to setup its decoding pipeline."}, 18 TC0014 : { start: "duration", end: null, valid: false, description: "#t=a with a >= e", fragment: "t=15", comment: "The request lies beyond the end of the resource. If the UA knows the duration of the resource, it seeks to the e nd of the media resource. Otherwise, the UA will send an (out-of-range) HTTP req uest with an 'include-setup' in order to setup its decoding pipeline."},
18 TC0015 : { start: null, end: 7, valid: true, description: "#t=,b and b > 0, b <= e", fragment: "t=,7", comment: "Equivalent to #t=0,b. The media is requ ested from 0 to b."}, 19 TC0015 : { start: null, end: 7, valid: true, description: "#t=,b and b > 0, b <= e", fragment: "t=,7", comment: "Equivalent to #t=0,b. The media is requested from 0 to b."},
19 TC0017 : { start: null, end: "duration", valid: true, description: "#t=, b and b > e", fragment: "t=,15", comment: "Equivalent to #t=0,e. The media is re quested from 0 to e."}, 20 TC0017 : { start: null, end: "duration", valid: true, description: " #t=,b and b > e", fragment: "t=,15", comment: "Equivalent to #t=0,e. The media i s requested from 0 to e."},
20 TC0024 : { start: 3, end: 7, valid: true, description: "NPT", fragment: "t=npt:3,7", comment: "equivalent to #t=3,7"}, 21 TC0024 : { start: 3, end: 7, valid: true, description: "NPT", fragme nt: "t=npt:3,7", comment: "equivalent to #t=3,7"},
21 TC0027 : { start: null, end: null, valid: false, description: "Illegal s trings", fragment: "t=banana", comment: "UA knows that this is an invalid media fragment, so it will play the entire media resource."}, 22 TC0027 : { start: null, end: null, valid: false, description: "Illeg al strings", fragment: "t=banana", comment: "UA knows that this is an invalid me dia fragment, so it will play the entire media resource."},
22 TC0028 : { start: null, end: null, valid: false, description: "Illegal s trings", fragment: "t=3,banana", comment: "UA knows that this is an invalid medi a fragment, so it will play the entire media resource."}, 23 TC0028 : { start: null, end: null, valid: false, description: "Illeg al strings", fragment: "t=3,banana", comment: "UA knows that this is an invalid media fragment, so it will play the entire media resource."},
23 TC0029 : { start: null, end: null, valid: false, description: "Illegal s trings", fragment: "t=banana,7", comment: "UA knows that this is an invalid medi a fragment, so it will play the entire media resource."}, 24 TC0029 : { start: null, end: null, valid: false, description: "Illeg al strings", fragment: "t=banana,7", comment: "UA knows that this is an invalid media fragment, so it will play the entire media resource."},
24 TC0030 : { start: null, end: null, valid: false, description: "Illegal s trings", fragment: "t='3'", comment: "UA knows that this is an invalid media fra gment, so it will play the entire media resource."}, 25 TC0030 : { start: null, end: null, valid: false, description: "Illeg al strings", fragment: "t='3'", comment: "UA knows that this is an invalid media fragment, so it will play the entire media resource."},
25 TC0031 : { start: null, end: null, valid: false, description: "Illegal s trings", fragment: "t=3-7", comment: "UA knows that this is an invalid media fra gment, so it will play the entire media resource."}, 26 TC0031 : { start: null, end: null, valid: false, description: "Illeg al strings", fragment: "t=3-7", comment: "UA knows that this is an invalid media fragment, so it will play the entire media resource."},
26 TC0032 : { start: null, end: null, valid: false, description: "Illegal s trings", fragment: "t=3:7", comment: "UA knows that this is an invalid media fra gment, so it will play the entire media resource."}, 27 TC0032 : { start: null, end: null, valid: false, description: "Illeg al strings", fragment: "t=3:7", comment: "UA knows that this is an invalid media fragment, so it will play the entire media resource."},
27 TC0033 : { start: null, end: null, valid: false, description: "Illegal s trings", fragment: "t=3,7,9", comment: "UA knows that this is an invalid media f ragment, so it will play the entire media resource."}, 28 TC0033 : { start: null, end: null, valid: false, description: "Illeg al strings", fragment: "t=3,7,9", comment: "UA knows that this is an invalid med ia fragment, so it will play the entire media resource."},
28 TC0034 : { start: null, end: null, valid: false, description: "Illegal s trings", fragment: "t%3D3", comment: "UA does not identify this as a media fragm ent, so it will play the entire media resource. Note: %3D is equivalent to =."}, 29 TC0034 : { start: null, end: null, valid: false, description: "Illeg al strings", fragment: "t%3D3", comment: "UA does not identify this as a media f ragment, so it will play the entire media resource. Note: %3D is equivalent to = ."},
29 TC0035 : { start: 3, end: null, valid: true, description: "Valid percent encoding", fragment: "%74=3", comment: "The media is requested from 3 seconds t o the end. Note: %74 is equivalent to t."}, 30 TC0035 : { start: 3, end: null, valid: true, description: "Valid per cent encoding", fragment: "%74=3", comment: "The media is requested from 3 secon ds to the end. Note: %74 is equivalent to t."},
30 TC0036 : { start: 3, end: null, valid: true, description: "Valid percent encoding", fragment: "t=%33", comment: "The media is requested from 3 seconds t o the end. Note: %33 is equivalent to 3."}, 31 TC0036 : { start: 3, end: null, valid: true, description: "Valid per cent encoding", fragment: "t=%33", comment: "The media is requested from 3 secon ds to the end. Note: %33 is equivalent to 3."},
31 TC0037 : { start: 3, end: 7, valid: true, description: "Valid percent en coding", fragment: "t=3%2C7", comment: "The media is requested from 3 to 7 secon ds. Note: %2C is equivalent to ,."}, 32 TC0037 : { start: 3, end: 7, valid: true, description: "Valid percen t encoding", fragment: "t=3%2C7", comment: "The media is requested from 3 to 7 s econds. Note: %2C is equivalent to ,."},
32 TC0038 : { start: 3, end: null, valid: true, description: "Valid percent encoding", fragment: "t=%6Ept:3", comment: "The media is requested from 3 secon ds to the end. %6E is equivalent to n."}, 33 TC0038 : { start: 3, end: null, valid: true, description: "Valid per cent encoding", fragment: "t=%6Ept:3", comment: "The media is requested from 3 s econds to the end. %6E is equivalent to n."},
33 TC0039 : { start: 3, end: null, valid: true, description: "Valid percent encoding", fragment: "t=npt%3A3", comment: "The media is requested from 3 secon ds to the end. Note: %3A is equivalent to :."}, 34 TC0039 : { start: 3, end: null, valid: true, description: "Valid per cent encoding", fragment: "t=npt%3A3", comment: "The media is requested from 3 s econds to the end. Note: %3A is equivalent to :."},
34 TC0044 : { start: null, end: null, valid: false, description: "#t=a,b an d a < 0", fragment: "t=-1,3", comment: "Invalid syntax: a '-' character is not a llowed at this position according to the ABNF. The UA knows that this is an inva lid media fragment, so it will play the entire media resource."}, 35 TC0044 : { start: null, end: null, valid: false, description: "#t=a, b and a < 0", fragment: "t=-1,3", comment: "Invalid syntax: a '-' character is n ot allowed at this position according to the ABNF. The UA knows that this is an invalid media fragment, so it will play the entire media resource."},
35 TC0051 : { start: 3, end: null, valid: true, description: "Trailing '&'" , fragment: "t=3&", comment: "After processing name-value pairs, this appears to be equivalent to #t=3."}, 36 TC0051 : { start: 3, end: null, valid: true, description: "Trailing '&'", fragment: "t=3&", comment: "After processing name-value pairs, this appear s to be equivalent to #t=3."},
36 TC0052 : { start: 3, end: null, valid: true, description: "Unknown keys" , fragment: "u=12&t=3", comment: "After processing name-value pairs, this appear s to be equivalent to #t=3."}, 37 TC0052 : { start: 3, end: null, valid: true, description: "Unknown k eys", fragment: "u=12&t=3", comment: "After processing name-value pairs, this ap pears to be equivalent to #t=3."},
37 TC0053 : { start: 3, end: null, valid: true, description: "Unknown unit" , fragment: "t=foo:7&t=npt:3", comment: "After processing name-value pairs, this appears to be equivalent to #t=3."}, 38 TC0053 : { start: 3, end: null, valid: true, description: "Unknown u nit", fragment: "t=foo:7&t=npt:3", comment: "After processing name-value pairs, this appears to be equivalent to #t=3."},
38 TC0054 : { start: 3, end: null, valid: true, description: "Unknown keys (bis)", fragment: "&&=&=tom&jerry=&t=3&t=meow:0#", comment: "After processing na me-value pairs, this appears to be equivalent to #t=3."}, 39 TC0054 : { start: 3, end: null, valid: true, description: "Unknown k eys (bis)", fragment: "&&=&=tom&jerry=&t=3&t=meow:0#", comment: "After processin g name-value pairs, this appears to be equivalent to #t=3."},
39 TC0055 : { start: 3, end: null, valid: true, description: "Duplicate (ke y - known unit) combination", fragment: "t=7&t=3", comment: "When a fragment dim ensions occurs multiple times, only the last occurrence of that dimension is int erpreted."}, 40 TC0055 : { start: 3, end: null, valid: true, description: "Duplicate (key - known unit) combination", fragment: "t=7&t=3", comment: "When a fragment dimensions occurs multiple times, only the last occurrence of that dimension is interpreted."},
40 TC0058 : { start: null, end: null, valid: false, description: "Invalid a xis parameters", fragment: "T=3,7", comment: "UA does not identify this as a med ia fragment. The entire media resource is played."}, 41 TC0058 : { start: null, end: null, valid: false, description: "Inval id axis parameters", fragment: "T=3,7", comment: "UA does not identify this as a media fragment. The entire media resource is played."},
41 TC0059 : { start: 3, end: null, valid: true, description: "Duplicate (ke y - known unit) combination", fragment: "t=smpte:00:00:01&t=npt:3", comment: "Wh en a fragment dimensions occurs multiple times, only the last occurrence of that dimension is interpreted."}, 42 TC0059 : { start: 3, end: null, valid: true, description: "Duplicate (key - known unit) combination", fragment: "t=smpte:00:00:01&t=npt:3", comment: "When a fragment dimensions occurs multiple times, only the last occurrence of that dimension is interpreted."},
42 TC0061 : { start: null, end: null, valid: false, description: "Illegal s trings", fragment: "t=", comment: "UA knows that this is an invalid media fragme nt, so it will play the entire media resource."}, 43 TC0061 : { start: null, end: null, valid: false, description: "Illeg al strings", fragment: "t=", comment: "UA knows that this is an invalid media fr agment, so it will play the entire media resource."},
43 TC0062 : { start: null, end: null, valid: false, description: "Illegal s trings", fragment: "t=.", comment: "UA knows that this is an invalid media fragm ent, so it will play the entire media resource."}, 44 TC0062 : { start: null, end: null, valid: false, description: "Illeg al strings", fragment: "t=.", comment: "UA knows that this is an invalid media f ragment, so it will play the entire media resource."},
44 TC0063 : { start: null, end: null, valid: false, description: "Illegal s trings", fragment: "t=.0", comment: "UA knows that this is an invalid media frag ment, so it will play the entire media resource."}, 45 TC0063 : { start: null, end: null, valid: false, description: "Illeg al strings", fragment: "t=.0", comment: "UA knows that this is an invalid media fragment, so it will play the entire media resource."},
45 TC0064 : { start: null, end: null, valid: false, description: "Illegal s trings", fragment: "t=0s", comment: "UA knows that this is an invalid media frag ment, so it will play the entire media resource."}, 46 TC0064 : { start: null, end: null, valid: false, description: "Illeg al strings", fragment: "t=0s", comment: "UA knows that this is an invalid media fragment, so it will play the entire media resource."},
46 TC0065 : { start: null, end: null, valid: false, description: "Illegal s trings", fragment: "t=,0s", comment: "UA knows that this is an invalid media fra gment, so it will play the entire media resource."}, 47 TC0065 : { start: null, end: null, valid: false, description: "Illeg al strings", fragment: "t=,0s", comment: "UA knows that this is an invalid media fragment, so it will play the entire media resource."},
47 TC0066 : { start: null, end: null, valid: false, description: "Illegal s trings", fragment: "t=0s,0s", comment: "UA knows that this is an invalid media f ragment, so it will play the entire media resource."}, 48 TC0066 : { start: null, end: null, valid: false, description: "Illeg al strings", fragment: "t=0s,0s", comment: "UA knows that this is an invalid med ia fragment, so it will play the entire media resource."},
48 TC0067 : { start: null, end: null, valid: false, description: "Illegal s trings", fragment: "t=00:00:00s", comment: "UA knows that this is an invalid med ia fragment, so it will play the entire media resource."}, 49 TC0067 : { start: null, end: null, valid: false, description: "Illeg al strings", fragment: "t=00:00:00s", comment: "UA knows that this is an invalid media fragment, so it will play the entire media resource."},
49 TC0068 : { start: null, end: null, valid: false, description: "Illegal s trings", fragment: "t=s", comment: "UA knows that this is an invalid media fragm ent, so it will play the entire media resource."}, 50 TC0068 : { start: null, end: null, valid: false, description: "Illeg al strings", fragment: "t=s", comment: "UA knows that this is an invalid media f ragment, so it will play the entire media resource."},
50 TC0069 : { start: null, end: null, valid: false, description: "Illegal s trings", fragment: "t=npt:", comment: "UA knows that this is an invalid media fr agment, so it will play the entire media resource."}, 51 TC0069 : { start: null, end: null, valid: false, description: "Illeg al strings", fragment: "t=npt:", comment: "UA knows that this is an invalid medi a fragment, so it will play the entire media resource."},
51 TC0070 : { start: null, end: null, valid: false, description: "Illegal s trings", fragment: "t=1e-1", comment: "UA knows that this is an invalid media fr agment, so it will play the entire media resource."}, 52 TC0070 : { start: null, end: null, valid: false, description: "Illeg al strings", fragment: "t=1e-1", comment: "UA knows that this is an invalid medi a fragment, so it will play the entire media resource."},
52 TC0071 : { start: null, end: null, valid: false, description: "Illegal s trings", fragment: "t=00:00:01.1e-1", comment: "UA knows that this is an invalid media fragment, so it will play the entire media resource."}, 53 TC0071 : { start: null, end: null, valid: false, description: "Illeg al strings", fragment: "t=00:00:01.1e-1", comment: "UA knows that this is an inv alid media fragment, so it will play the entire media resource."},
53 TC0072 : { start: 3, end: null, valid: true, description: "Trailing dot" , fragment: "t=3.", comment: "Equivalent to #t=a,e. The media is requested from a to e."}, 54 TC0072 : { start: 3, end: null, valid: true, description: "Trailing dot", fragment: "t=3.", comment: "Equivalent to #t=a,e. The media is requested f rom a to e."},
54 TC0073 : { start: null, end: null, valid: false, description: "Illegal s trings", fragment: "t=0:0:0", comment: "UA knows that this is an invalid media f ragment, so it will play the entire media resource."}, 55 TC0073 : { start: null, end: null, valid: false, description: "Illeg al strings", fragment: "t=0:0:0", comment: "UA knows that this is an invalid med ia fragment, so it will play the entire media resource."},
55 TC0074 : { start: null, end: null, valid: false, description: "Illegal s trings", fragment: "t=0:00:60", comment: "UA knows that this is an invalid media fragment, so it will play the entire media resource."}, 56 TC0074 : { start: null, end: null, valid: false, description: "Illeg al strings", fragment: "t=0:00:60", comment: "UA knows that this is an invalid m edia fragment, so it will play the entire media resource."},
56 TC0075 : { start: null, end: null, valid: false, description: "Illegal s trings", fragment: "t=0:01:60", comment: "UA knows that this is an invalid media fragment, so it will play the entire media resource."}, 57 TC0075 : { start: null, end: null, valid: false, description: "Illeg al strings", fragment: "t=0:01:60", comment: "UA knows that this is an invalid m edia fragment, so it will play the entire media resource."},
57 TC0076 : { start: null, end: null, valid: false, description: "Illegal s trings", fragment: "t=0:60:00", comment: "UA knows that this is an invalid media fragment, so it will play the entire media resource."}, 58 TC0076 : { start: null, end: null, valid: false, description: "Illeg al strings", fragment: "t=0:60:00", comment: "UA knows that this is an invalid m edia fragment, so it will play the entire media resource."},
58 TC0077 : { start: null, end: null, valid: false, description: "Illegal s trings", fragment: "t=0:000:000", comment: "UA knows that this is an invalid med ia fragment, so it will play the entire media resource."}, 59 TC0077 : { start: null, end: null, valid: false, description: "Illeg al strings", fragment: "t=0:000:000", comment: "UA knows that this is an invalid media fragment, so it will play the entire media resource."},
59 TC0078 : { start: 3, end: 7, valid: true, description: "NPT HH:MM:SS for mat", fragment: "t=00:00:03,00:00:07", comment: "The media is requested from a t o b."}, 60 TC0078 : { start: 3, end: 7, valid: true, description: "NPT HH:MM:SS format", fragment: "t=00:00:03,00:00:07", comment: "The media is requested from a to b."},
60 TC0079 : { start: 3, end: 7, valid: true, description: "NPT mixed format s", fragment: "t=3,00:00:07", comment: "The media is requested from a to b."}, 61 TC0079 : { start: 3, end: 7, valid: true, description: "NPT mixed fo rmats", fragment: "t=3,00:00:07", comment: "The media is requested from a to b." },
61 TC0080 : { start: null, end: null, valid: true, description: "NPT, trail ing dot", fragment: "t=00:00.", comment: "A valid media fragment: { starting at 0 seconds. Thus, the UA will play the entire media resource."}, 62 TC0080 : { start: null, end: null, valid: true, description: "NPT, t railing dot", fragment: "t=00:00.", comment: "A valid media fragment: { starting at 0 seconds. Thus, the UA will play the entire media resource."},
62 TC0081 : { start: null, end: null, valid: true, description: "NPT, trail ing dot (bis)", fragment: "t=0:00:00.", comment: "A valid media fragment: { star ting at 0 seconds. Thus, the UA will play the entire media resource."}, 63 TC0081 : { start: null, end: null, valid: true, description: "NPT, t railing dot (bis)", fragment: "t=0:00:00.", comment: "A valid media fragment: { starting at 0 seconds. Thus, the UA will play the entire media resource."},
63 TC0082 : { start: null, end: null, valid: false, description: "Illegal s trings", fragment: "t=0:00:10e-1", comment: "UA knows that this is an invalid me dia fragment, so it will play the entire media resource."}, 64 TC0082 : { start: null, end: null, valid: false, description: "Illeg al strings", fragment: "t=0:00:10e-1", comment: "UA knows that this is an invali d media fragment, so it will play the entire media resource."},
64 TC0083 : { start: null, end: null, valid: false, description: "Illegal s trings", fragment: "t=0:00:60.000", comment: "UA knows that this is an invalid m edia fragment, so it will play the entire media resource."}, 65 TC0083 : { start: null, end: null, valid: false, description: "Illeg al strings", fragment: "t=0:00:60.000", comment: "UA knows that this is an inval id media fragment, so it will play the entire media resource."},
65 TC0084 : { start: null, end: null, valid: false, description: "Illegal s trings", fragment: "t=0:60:00.000", comment: "UA knows that this is an invalid m edia fragment, so it will play the entire media resource."}, 66 TC0084 : { start: null, end: null, valid: false, description: "Illeg al strings", fragment: "t=0:60:00.000", comment: "UA knows that this is an inval id media fragment, so it will play the entire media resource."},
66 TC0085 : { start: 3, end: 7, valid: true, description: "Trailing invalid time fragment is ignored", fragment: "t=3,7&t=foo", comment: "The media is requ ested from a to b."}, 67 TC0085 : { start: 3, end: 7, valid: true, description: "Trailing inv alid time fragment is ignored", fragment: "t=3,7&t=foo", comment: "The media is requested from a to b."},
67 TC0086 : { start: 3, end: 7, valid: true, description: "Rubbish before & ", fragment: "foo&t=3,7", comment: "Rubbish before & is ignored."}, 68 TC0086 : { start: 3, end: 7, valid: true, description: "Rubbish befo re &", fragment: "foo&t=3,7", comment: "Rubbish before & is ignored."},
68 TC0087 : { start: 3, end: 7, valid: true, description: "Rubbish after &" , fragment: "t=3,7&foo", comment: "Rubbish after & is ignored."}, 69 TC0087 : { start: 3, end: 7, valid: true, description: "Rubbish afte r &", fragment: "t=3,7&foo", comment: "Rubbish after & is ignored."},
69 TC0088 : { start: 3, end: 7, valid: true, description: "Sprinkling &", f ragment: "t=3,7&&", comment: "Sprinkling & is OK."}, 70 TC0088 : { start: 3, end: 7, valid: true, description: "Sprinkling & ", fragment: "t=3,7&&", comment: "Sprinkling & is OK."},
70 TC0089 : { start: 3, end: 7, valid: true, description: "Sprinkling &", f ragment: "&t=3,7", comment: "Sprinkling & is OK."}, 71 TC0089 : { start: 3, end: 7, valid: true, description: "Sprinkling & ", fragment: "&t=3,7", comment: "Sprinkling & is OK."},
71 TC0090 : { start: 3, end: 7, valid: true, description: "Sprinkling &", f ragment: "&&t=3,7", comment: "Sprinkling & is OK."}, 72 TC0090 : { start: 3, end: 7, valid: true, description: "Sprinkling & ", fragment: "&&t=3,7", comment: "Sprinkling & is OK."},
72 TC0091 : { start: 3, end: 7, valid: true, description: "Sprinkling &", f ragment: "&t=3,7&", comment: "Sprinkling & is OK."}, 73 TC0091 : { start: 3, end: 7, valid: true, description: "Sprinkling & ", fragment: "&t=3,7&", comment: "Sprinkling & is OK."},
73 TC0092 : { start: null, end: null, valid: false, description: "Incorrect percent encoding", fragment: "t%3d10", comment: "UA knows that this is an inval id media fragment, so it will play the entire media resource."}, 74 TC0092 : { start: null, end: null, valid: false, description: "Incor rect percent encoding", fragment: "t%3d10", comment: "UA knows that this is an i nvalid media fragment, so it will play the entire media resource."},
74 TC0093 : { start: null, end: null, valid: false, description: "Incorrect percent encoding", fragment: "t=10%26", comment: "UA knows that this is an inva lid media fragment, so it will play the entire media resource."}, 75 TC0093 : { start: null, end: null, valid: false, description: "Incor rect percent encoding", fragment: "t=10%26", comment: "UA knows that this is an invalid media fragment, so it will play the entire media resource."},
75 TC0094 : { start: null, end: null, valid: false, description: "Trailing comma", fragment: "t=3,7,", comment: "UA knows that this is an invalid media fra gment, so it will play the entire media resource."} 76 TC0094 : { start: null, end: null, valid: false, description: "Trail ing comma", fragment: "t=3,7,", comment: "UA knows that this is an invalid media fragment, so it will play the entire media resource."}
76 }; 77 };
77 78
78 function pause() 79 var video = document.createElement("video");
79 {
80 const maximumStopDelta = 0.5;
81 var delta = Math.abs(video.currentTime - fragmentEndTime).toFixed(2);
82 reportExpected((delta <= maximumStopDelta), ("video.currentTime - fragme ntEndTime"), "<=", maximumStopDelta, delta);
83 80
84 endTest(); 81 video.oncanplaythrough = t.step_func(function() {
85 } 82 video.oncanplaythrough = null;
83 var info = testData[currentTest];
84 var duration = video.duration.toFixed(2);
85 var start = info.start ? info.start : 0;
86 fragmentEndTime = info.end ? info.end : duration;
86 87
87 function canplaythrough() 88 if (start == "duration")
88 { 89 start = duration;
89 var info = testData[currentTest]; 90 if (fragmentEndTime == "duration")
90 var duration = video.duration.toFixed(2); 91 fragmentEndTime = duration;
91 var start = info.start ? info.start : 0;
92 fragmentEndTime = info.end ? info.end : duration;
93 92
94 if (start == "duration") 93 assert_equals(video.currentTime, start);
95 start = duration;
96 if (fragmentEndTime == "duration")
97 fragmentEndTime = duration;
98 94
99 // Don't use "testExpected()" so we won't log the actual duration as the floating point result may differ with different engines. 95 if (info.valid) {
100 var startString = info.start == "duration" ? "duration" : start; 96 video.currentTime = (fragmentEndTime - 0.5);
101 reportExpected(video.currentTime.toFixed(2) == start, "video.currentTime ", "==", startString, video.currentTime); 97 video.play();
98 } else
99 t.done();
100 });
102 101
103 if (info.valid) { 102 video.onpause = t.step_func_done(function() {
104 video.currentTime = (fragmentEndTime - 0.5); 103 const maximumStopDelta = 0.5;
105 run("video.play()"); 104 var delta = Math.abs(video.currentTime - fragmentEndTime).toFixed(2) ;
106 } else 105 assert_less_than_equal(delta, maximumStopDelta);
107 endTest(); 106 });
108 }
109 107
110 function start() 108 var fileName = location.href.split("/").pop();
111 {
112 video = document.createElement('video');
113 video.setAttribute('id', 'vid');
114 video.setAttribute('width', '320');
115 video.setAttribute('height', '240');
116 video.setAttribute('controls', '');
117 var paragraph = document.createElement('p');
118 paragraph.appendChild(video);
119 document.body.appendChild(paragraph);
120
121 waitForEventOnce("canplaythrough", canplaythrough);
122 waitForEvent("pause", pause);
123
124 var fileName = location.href.split('/').pop();
125 currentTest = fileName.substring(0, fileName.lastIndexOf(".")); 109 currentTest = fileName.substring(0, fileName.lastIndexOf("."));
Srirama 2016/06/28 11:00:45 Should i pass the testcase name instead?
126 110
127 var info = testData[currentTest]; 111 var info = testData[currentTest];
128 consoleWrite("<br>Title: <b>" + currentTest + "</b>");
129 consoleWrite("Fragment: '<i>" + info.fragment + "</i>'");
130 consoleWrite("Comment: <i>" + info.comment + "</i>");
131 url = findMediaFile("video", "../content/counting") + "#" + info.fragmen t; 112 url = findMediaFile("video", "../content/counting") + "#" + info.fragmen t;
132 video.src = url; 113 video.src = url;
133 } 114 });
115 }
OLDNEW
« no previous file with comments | « third_party/WebKit/LayoutTests/media/media-fragments/TC0001-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698