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

Side by Side Diff: chrome/test/data/media/html/media_seek.html

Issue 9960063: CNS seek tests for <video>. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 8 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
(Empty)
1 <!-- Used by media_constrained_network_perf to record perf metrics. -->
DaleCurtis 2012/04/10 23:00:06 Name?
shadi 2012/04/18 02:03:17 Done.
2 <!DOCTYPE html>
3 <html lang="en-US">
4 <head>
5 <title>CNS Seek Tests</title>
6 <script src="benchmark.js" type="text/javascript"></script>
7 </head>
8
9 <body>
10 <video autoplay controls></video>
11 <div id="l"></div>
DaleCurtis 2012/04/10 23:00:06 Choose a better ID here.
shadi 2012/04/18 02:03:17 Done.
12 </body>
13
14 <script type="text/javascript">
15 var v = document.querySelector('video');
16 var l = document.getElementById("l");
DaleCurtis 2012/04/10 23:00:06 Does .querySelector('div') not work?
shadi 2012/04/18 02:03:17 It does since this is the only div.
17 var endTest = false;
18 var shortSeeks = [];
19 var longSeeks = [];
20 var errorMsg = '';
21
22 // Called by the PyAuto controller to initiate testing.
23 function startTest(src) {
24 var perf = new Benchmark(v, src);
25 shortSeeks = [];
26 longSeeks = [];
27 endTest = false;
28 errorMsg = '';
29
30 // Tell the PyAuto controller that the test has started.
31 if (window.domAutomationController)
32 window.domAutomationController.send(true);
33
34 log('Starting seeking tests on ' + src);
DaleCurtis 2012/04/10 23:00:06 Benchmark seems to already log this?
shadi 2012/04/18 02:03:17 Done.
35 perf.testShortSeek(3, function(success, result) {
36 log('Short seek (cached): ' + result);
DaleCurtis 2012/04/10 23:00:06 Why are these labeled cached/un-cached? I don't se
37 if (!success) {
38 errorMsg = result;
39 } else {
40 shortSeeks = result;
41 }
42 perf.testLongSeek(3, function(success, result) {
43 log('Long seek (un-cached): ' + result);
44 if (!success) {
45 errorMsg = result;
46 } else {
47 longSeeks = result;
48 endTest = true;
49 }
50 });
51 });
52 }
53
54 function log(text) {
55 l.innerText = l.innerText + text + '\n';
56 console.log(text);
DaleCurtis 2012/04/10 23:00:06 if (console && console.log) ?
57 }
58 </script>
59 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698