replace spaces with underscore for browsernames in WPT #798

This commit is contained in:
soulgalore 2016-01-09 20:44:45 +01:00
parent 4c3921e7a8
commit 91f89336b9
3 changed files with 3 additions and 3 deletions

View File

@ -56,7 +56,7 @@ WPTAggregator.prototype.processPage = function(pageData) {
WPTAggregator.prototype._collectData = function(run, view, browserAndLocation) {
var self = this;
var bAndL = browserAndLocation.response.data.location.split(':');
var browser = bAndL[1].toLowerCase();
var browser = bAndL[1].toLowerCase().replace(' ', '_');
var location = bAndL[0].toLowerCase();
var connectivity = (browserAndLocation.response.data.connectivity).toLowerCase();
var key = view + location + browser + connectivity;

View File

@ -11,7 +11,7 @@ var Stats = require('fast-stats').Stats;
function WPTMetric(metricName, view, location, browser, connectivity) {
this.view = view;
this.location = location;
this.browser = browser;
this.browser = browser.replace(' ', '_');
this.connectivity = connectivity;
this.metricName = metricName;

View File

@ -199,7 +199,7 @@ function collectWPT(pageData, p) {
var connectivity = browserAndLocation.response.data.connectivity.toLowerCase();
var locationAndBrowser = browserAndLocation.response.data.location.split(':');
var location = locationAndBrowser[0].toLowerCase();
var browser = locationAndBrowser[1].toLowerCase();
var browser = locationAndBrowser[1].toLowerCase().replace(' ', '_');
// if we don't have it, setup a clean object
p.wpt[location] = p.wpt[location] || {};