Flakiness dashboard assumes there must be ToT tests
[WebKit-https.git] / Tools / TestResultServer / static-dashboards / loader.js
index ed3c4f7898aeedb874dc8226f407fb04bc63e3fc..1e2d646a32ae084ed23d05b5fcee3494f399f973 100644 (file)
@@ -67,6 +67,7 @@ loader.Loader = function()
 
     this._buildersThatFailedToLoad = [];
     this._staleBuilders = [];
+    this._loadingComplete = false;
 }
 
 loader.Loader.prototype = {
@@ -74,10 +75,18 @@ loader.Loader.prototype = {
     {
         this._loadNext();
     },
+    isLoadingComplete: function()
+    {
+        return this._loadingComplete;
+    },
     _loadNext: function()
     {
         var loadingStep = this._loadingSteps.shift();
         if (!loadingStep) {
+            this._loadingComplete = true;
+            // FIXME(jparent): Loader should not know about global
+            // functions, should use a callback or dispatch load
+            // event instead.
             resourceLoadingComplete(this._getLoadingErrorMessages());
             return;
         }
@@ -85,7 +94,7 @@ loader.Loader.prototype = {
     },
     _loadBuildersList: function()
     {
-        loadBuildersList(g_crossDashboardState.group, g_crossDashboardState.testType);
+        loadBuildersList(currentBuilderGroupName(), g_crossDashboardState.testType);
         this._loadNext();
     },
     _loadResultsFiles: function()