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

Unified Diff: chrome/test/data/third_party/spaceport/js/util/cacheBust.js

Issue 10154006: Add test data for spaceport benchmark. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
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 side-by-side diff with in-line comments
Download patch
Index: chrome/test/data/third_party/spaceport/js/util/cacheBust.js
diff --git a/chrome/test/data/third_party/spaceport/js/util/cacheBust.js b/chrome/test/data/third_party/spaceport/js/util/cacheBust.js
new file mode 100644
index 0000000000000000000000000000000000000000..b5e1a1f55daa72b9befde3e649c650b38f3e8dc4
--- /dev/null
+++ b/chrome/test/data/third_party/spaceport/js/util/cacheBust.js
@@ -0,0 +1,17 @@
+define([ ], function () {
+ var cacheBust = {
+ buster: function buster() {
+ return String(Math.random()).replace(/[^0-9]/g, '');
+ },
+
+ url: function cacheBustUrl(url) {
+ if (/\?/.test(url)) {
+ return url + '&' + cacheBust.buster();
+ } else {
+ return url + '?' + cacheBust.buster();
+ }
+ }
+ };
+
+ return cacheBust;
+});

Powered by Google App Engine
This is Rietveld 408576698