diff --git a/chrome/test/data/media/html/media_seek.html b/chrome/test/data/media/html/media_seek.html new file mode 100644 index 00000000000000..03e72123289795 --- /dev/null +++ b/chrome/test/data/media/html/media_seek.html @@ -0,0 +1,132 @@ + + + + + CNS Seek Tests + + + + + +
+ + + + diff --git a/chrome/test/data/media/html/utils.js b/chrome/test/data/media/html/utils.js index 7dff4bab7d66dc..77c67ccd04f740 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(); +} \ No newline at end of file diff --git a/chrome/test/functional/media/media_seek_perf.py b/chrome/test/functional/media/media_seek_perf.py new file mode 100644 index 00000000000000..432eb1f452cc43 --- /dev/null +++ b/chrome/test/functional/media/media_seek_perf.py @@ -0,0 +1,106 @@ +#!/usr/bin/env python +# Copyright (c) 2012 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +"""Seek performance testing for