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(); |
+} |