Upstream version 9.38.198.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / Tools / TestResultServer / static-dashboards / history.js
index ec18f7f..7406f74 100644 (file)
@@ -32,7 +32,7 @@ var history = history || {};
 (function() {
 
 history.DEFAULT_CROSS_DASHBOARD_STATE_VALUES = {
-    group: null,
+    group: '@ToT Blink',
     showAllRuns: false,
     testType: 'layout-tests',
     useTestData: false,
@@ -71,21 +71,21 @@ history.queryHashAsMap = function()
         paramsMap[thisParam[0]] = decodeURIComponent(thisParam[1]);
     }
 
-    // FIXME: remove support for mapping from the master parameter to the group
-    // one once the waterfall starts to pass in the builder name instead.
+    // FIXME: Make master a first-class parameter instead of replacing it with the group.
     if (paramsMap.master) {
         var errors = new ui.Errors();
         if (paramsMap.master == 'TryServer')
             errors.addError('ERROR: You got here from the trybot waterfall. The try bots do not record data in the flakiness dashboard. Showing results for the regular waterfall.');
-        else if (!builders.masters[paramsMap.master])
+        else if (!builders.masters[paramsMap.master] && !builders.urlNameToMasterName[paramsMap.master])
             errors.addError('ERROR: Unknown master name: ' + paramsMap.master);
 
         if (errors.hasErrors()) {
             errors.show();
             window.location.hash = window.location.hash.replace('master=' + paramsMap.master, '');
         } else {
-            var groupIndex = paramsMap.master == 'ChromiumWebkit' ? 1 : 0;
-            paramsMap.group = builders.masters[paramsMap.master].groups[groupIndex];
+            var master = builders.urlNameToMasterName[paramsMap.master] || paramsMap.master;
+            var groupIndex = master == 'ChromiumWebkit' ? 1 : 0;
+            paramsMap.group = builders.masters[master].groups[groupIndex];
             window.location.hash = window.location.hash.replace('master=' + paramsMap.master, 'group=' + encodeURIComponent(paramsMap.group));
             delete paramsMap.master;
         }
@@ -150,6 +150,11 @@ history.History.prototype = {
         window.onhashchange = this._handleLocationChange.bind(this);
         this._handleLocationChange();
     },
+    isBlinkGroup: function()
+    {
+        var group = this.crossDashboardState.group;
+        return group && group.indexOf('@ToT Blink') >= 0;
+    },
     isLayoutTestResults: function()
     {
         return this.crossDashboardState.testType == 'layout-tests';