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

Unified Diff: chrome/test/functional/perf/endure_graphs/js/common.js

Issue 11293043: Merge chrome perf graphing change into Chrome Endure fork of graphing code. Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 1 month 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/functional/perf/endure_graphs/js/common.js
diff --git a/chrome/test/functional/perf/endure_graphs/js/common.js b/chrome/test/functional/perf/endure_graphs/js/common.js
index 96399dc550188c7232c8e2c38af575eb4df33cea..dc12d1eebc7313c482edb051ae63df3d38237f8d 100644
--- a/chrome/test/functional/perf/endure_graphs/js/common.js
+++ b/chrome/test/functional/perf/endure_graphs/js/common.js
@@ -77,13 +77,16 @@ function ParseParams() {
* @return {string} The URL constructed from the given params.
*/
function MakeURL(params) {
- var url = window.location.pathname;
- var sep = '?';
- for (p in params) {
- if (!p)
- continue;
- url += sep + p + '=' + params[p];
- sep = '&';
+ var arr = [];
+ for (var p in params) {
+ if (typeof params[p] == 'object') {
+ // Repeated params, stored as hash like {valueA: 1, valueB: 1}
+ for (var r in params[p]) {
+ arr.push(p + '=' + r);
alias of yukishiino 2012/11/02 04:19:19 I'm not sure if it's necessary to check the value
alias of yukishiino 2012/11/02 04:19:19 You should call encodeURIComponent for each value.
+ }
+ } else {
+ arr.push(p + '=' + params[p]);
+ }
}
- return url;
+ return window.location.pathname + '?' + arr.join('&');
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698