Title: [95775] trunk/LayoutTests
- Revision
- 95775
- Author
- ann...@chromium.org
- Date
- 2011-09-22 19:40:16 -0700 (Thu, 22 Sep 2011)
Log Message
Adding testTracks() function to video-test.js
https://bugs.webkit.org/show_bug.cgi?id=68643
Reviewed by Eric Carlson.
* media/video-test.js:
(testTracks):
Modified Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (95774 => 95775)
--- trunk/LayoutTests/ChangeLog 2011-09-23 02:28:31 UTC (rev 95774)
+++ trunk/LayoutTests/ChangeLog 2011-09-23 02:40:16 UTC (rev 95775)
@@ -1,3 +1,13 @@
+2011-09-22 Anna Cavender <ann...@chromium.org>
+
+ Adding testTracks() function to video-test.js
+ https://bugs.webkit.org/show_bug.cgi?id=68643
+
+ Reviewed by Eric Carlson.
+
+ * media/video-test.js:
+ (testTracks):
+
2011-09-22 Tom Sepez <tse...@chromium.org>
Make XSSAuditor extract meaningful snippet from script blocks for comparison
Modified: trunk/LayoutTests/media/video-test.js (95774 => 95775)
--- trunk/LayoutTests/media/video-test.js 2011-09-23 02:28:31 UTC (rev 95774)
+++ trunk/LayoutTests/media/video-test.js 2011-09-23 02:40:16 UTC (rev 95775)
@@ -5,6 +5,7 @@
var printFullTestDetails = true; // This is optionaly switched of by test whose tested values can differ. (see disableFullTestDetailsPrinting())
var Failed = false;
+var track = null; // Current TextTrack being tested.
var cues = null; // Current TextTrackCueList being tested.
var numberOfTrackTests = 0;
var numberOfTracksLoaded = 0;
@@ -240,6 +241,22 @@
return false;
}
+function testTracks(expected)
+{
+ tracks = video.textTracks;
+ testExpected("tracks.length", expected.length);
+
+ for (i = 0; i < tracks.length; i++) {
+ consoleWrite("<br>*** Testing text track " + i);
+
+ track = tracks[i];
+ for (j = 0; j < expected.tests.length; j++) {
+ var test = expected.tests[j];
+ testExpected("track." + test.property, test.values[i]);
+ }
+ }
+}
+
function testCues(index, expected)
{
consoleWrite("<br>*** Testing text track " + index);
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes