blob: a98cb84e28ab13c0ab1320183f41f6ae8f0e9809 [file] [log] [blame]
eric.carlson@apple.comdb9b17f2009-06-23 14:49:19 +00001<html>
2 <head>
eric.carlson@apple.com656a7632009-03-04 01:06:50 +00003
eric.carlson@apple.comdb9b17f2009-06-23 14:49:19 +00004 <script src=video-test.js></script>
5 <script>
6 function testOnLoadStart()
7 {
8 consoleWrite("EVENT(" + event.type + ")");
9 testExpected("!event.lengthComputable", true);
10 testExpected("event.total", 0);
11 testExpected("event.loaded", 0);
12 }
13
14 function testOnLoad()
15 {
16 consoleWrite("EVENT(" + event.type + ")");
17 testExpected("event.lengthComputable", true);
18 testExpected("event.loaded", 0, '>');
19 var allowedTotalBytes = [188483, 192844];
20 if (event.total == allowedTotalBytes[0] || event.total == allowedTotalBytes[1])
21 consoleWrite("SUCCESS: event.total is " + allowedTotalBytes[0] + " or " + allowedTotalBytes[1] + " (Playback engine specific)");
22 else
23 consoleWrite("FAIL: event.total should not be " + event.total + " (should be " + allowedTotalBytes[0] + " or " + allowedTotalBytes[1] + ")");
24 endTest();
25 }
eric.carlson@apple.com656a7632009-03-04 01:06:50 +000026
eric.carlson@apple.comdb9b17f2009-06-23 14:49:19 +000027 function start()
28 {
29 findMediaElement();
30 }
eric.carlson@apple.com656a7632009-03-04 01:06:50 +000031
eric.carlson@apple.comdb9b17f2009-06-23 14:49:19 +000032 </script>
33 </head>
eric.carlson@apple.com656a7632009-03-04 01:06:50 +000034
eric.carlson@apple.comdb9b17f2009-06-23 14:49:19 +000035 <body onload="start()">
eric.carlson@apple.com656a7632009-03-04 01:06:50 +000036
eric.carlson@apple.comdb9b17f2009-06-23 14:49:19 +000037 <video controls src="content/test.mp4" onloadstart="testOnLoadStart()" onload="testOnLoad()">
38 </video>
eric.carlson@apple.com656a7632009-03-04 01:06:50 +000039
eric.carlson@apple.comdb9b17f2009-06-23 14:49:19 +000040 </body>
41</html>