Dashboard cleanup: remove usage of global g_builders.
https://bugs.webkit.org/show_bug.cgi?id=104941
Reviewed by Dirk Pranke.
The dashboards use a lot of global state, which makes hacking on them
complicated. This change removes the use of one such global: g_builders.
In most cases, we can just use currentBuilderGroup().builders instead,
which is now currentBuilders().
Surprisingly, the most changes were required to the unit tests, since
they were even bigger offenders of bad hygiene, relying on global state
set by other tests, randomly clobbering global variables in ways the
real code doesn't, etc.
* TestResultServer/static-dashboards/builders.js:
(BuilderGroup.prototype.setup):
* TestResultServer/static-dashboards/dashboard_base.js:
(.switch.return):
(htmlForTestTypeSwitcher):
* TestResultServer/static-dashboards/flakiness_dashboard.js:
(generatePage):
(getAllTestsTrie):
(processTestRunsForAllBuilders):
(showPopupForBuild):
(generatePageForExpectationsUpdate):
(loadExpectationsLayoutTests):
* TestResultServer/static-dashboards/flakiness_dashboard_unittests.js:
(resetGlobals):
(stubResultsByBuilder):
(test):
* TestResultServer/static-dashboards/loader.js:
(.):
* TestResultServer/static-dashboards/loader_unittests.js:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@137693
268f45cc-cd09-0410-ab3c-
d52691b4dbfc