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

Unified Diff: chrome/test/data/media/html/utils.js

Issue 9960063: CNS seek tests for <video>. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Full video test list. 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 side-by-side diff with in-line comments
Download patch
Index: chrome/test/data/media/html/utils.js
diff --git a/chrome/test/data/media/html/utils.js b/chrome/test/data/media/html/utils.js
index 7dff4bab7d66dce4fb7f86a73a17d439c884d93f..77c67ccd04f74094266a53f127b91bc9cdf781b6 100644
--- a/chrome/test/data/media/html/utils.js
+++ b/chrome/test/data/media/html/utils.js
@@ -27,3 +27,30 @@ var QueryString = function () {
return params;
} ();
+
+function Timer() {
+ this.start_ = 0;
+ this.times_ = [];
+}
+
+Timer.prototype = {
+ start: function() {
+ this.start_ = new Date().getTime();
+ },
+
+ stop: function() {
+ var delta = new Date().getTime() - this.start_;
+ this.times_.push(delta);
+ return delta;
+ },
+
+ reset: function() {
+ this.start_ = 0;
+ this.times_ = [];
+ }
+}
+
+function GenerateUniqueURL(src) {
+ var ch = src.indexOf('?') >= 0 ? '&' : '?';
+ return src + ch + 't=' + (new Date()).getTime();
+}

Powered by Google App Engine
This is Rietveld 408576698