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

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

Issue 17395006: Fix LayoutTests that assume canplay, playing, and canplaythrough will only fire once. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix event-attributes expectations. Created 7 years, 6 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 | Annotate | Revision Log
OLDNEW
1 1
2 var currentTest = null; 2 var currentTest = null;
3 var fragmentEndTime; 3 var fragmentEndTime;
4 var testData = 4 var testData =
5 { 5 {
6 // http://www.w3.org/2008/WebVideo/Fragments/TC/ua-test-cases 6 // http://www.w3.org/2008/WebVideo/Fragments/TC/ua-test-cases
7 7
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."}, 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 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."}, 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 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."}, 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."},
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 { 112 {
113 video = document.createElement('video'); 113 video = document.createElement('video');
114 video.setAttribute('id', 'vid'); 114 video.setAttribute('id', 'vid');
115 video.setAttribute('width', '320'); 115 video.setAttribute('width', '320');
116 video.setAttribute('height', '240'); 116 video.setAttribute('height', '240');
117 video.setAttribute('controls', ''); 117 video.setAttribute('controls', '');
118 var paragraph = document.createElement('p'); 118 var paragraph = document.createElement('p');
119 paragraph.appendChild(video); 119 paragraph.appendChild(video);
120 document.body.appendChild(paragraph); 120 document.body.appendChild(paragraph);
121 121
122 waitForEvent("canplaythrough", canplaythrough); 122 waitForEventOnce("canplaythrough", canplaythrough);
123 waitForEvent("pause", pause); 123 waitForEvent("pause", pause);
124 124
125 var fileName = location.href.split('/').pop(); 125 var fileName = location.href.split('/').pop();
126 currentTest = fileName.substring(0, fileName.lastIndexOf(".")); 126 currentTest = fileName.substring(0, fileName.lastIndexOf("."));
127 127
128 var info = testData[currentTest]; 128 var info = testData[currentTest];
129 consoleWrite("<br>Title: <b>" + currentTest + "</b>"); 129 consoleWrite("<br>Title: <b>" + currentTest + "</b>");
130 consoleWrite("Fragment: '<i>" + info.fragment + "</i>'"); 130 consoleWrite("Fragment: '<i>" + info.fragment + "</i>'");
131 consoleWrite("Comment: <i>" + info.comment + "</i>"); 131 consoleWrite("Comment: <i>" + info.comment + "</i>");
132 url = findMediaFile("video", "../content/counting") + "#" + info.fragmen t; 132 url = findMediaFile("video", "../content/counting") + "#" + info.fragmen t;
133 video.src = url; 133 video.src = url;
134 } 134 }
OLDNEW
« no previous file with comments | « LayoutTests/media/media-element-play-after-eos.html ('k') | LayoutTests/media/track/track-css-cue-lifetime.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698