Dashboard cleanup: remove usage of global g_builders.
authorjparent@chromium.org <jparent@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 14 Dec 2012 02:02:51 +0000 (02:02 +0000)
committerjparent@chromium.org <jparent@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 14 Dec 2012 02:02:51 +0000 (02:02 +0000)
commiteeba78d1f31311fa21572027c9f6d2c3d5a650e3
treea8477f34e96bc4ff14735386d297bee9f46b067a
parentf4c330c6dd02dc3b5a22fe18179ab42a4efe4de9
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
Tools/ChangeLog
Tools/TestResultServer/static-dashboards/aggregate_results.html
Tools/TestResultServer/static-dashboards/builders.js
Tools/TestResultServer/static-dashboards/dashboard_base.js
Tools/TestResultServer/static-dashboards/flakiness_dashboard.js
Tools/TestResultServer/static-dashboards/flakiness_dashboard_unittests.js
Tools/TestResultServer/static-dashboards/loader.js
Tools/TestResultServer/static-dashboards/loader_unittests.js
Tools/TestResultServer/static-dashboards/timeline_explorer.html
Tools/TestResultServer/static-dashboards/treemap.html