Modified: trunk/Websites/test-results/config.json (158094 => 158095)
--- trunk/Websites/test-results/config.json 2013-10-27 00:48:30 UTC (rev 158094)
+++ trunk/Websites/test-results/config.json 2013-10-27 00:48:54 UTC (rev 158095)
@@ -17,5 +17,11 @@
"LayoutTest": {
"url": "https://trac.webkit.org/browser/trunk/LayoutTests/$testName"
}
- }
+ },
+ "newBugLinks": [
+ {
+ "label": "File a bug",
+ "url": "https://bugs.webkit.org/enter_bug.cgi?product=WebKit&component=Tools%20/%20Tests&form_name=enter_bug&keywords=LayoutTestFailure"
+ }
+ ]
}
Modified: trunk/Websites/test-results/public/api/manifest.php (158094 => 158095)
--- trunk/Websites/test-results/public/api/manifest.php 2013-10-27 00:48:30 UTC (rev 158094)
+++ trunk/Websites/test-results/public/api/manifest.php 2013-10-27 00:48:54 UTC (rev 158095)
@@ -16,5 +16,6 @@
'builders' => $builders,
'slaves' => $db->fetch_table('slaves'),
'repositories' => $repositories,
- 'testCategories' => config('testCategories')));
+ 'testCategories' => config('testCategories'),
+ 'newBugLinks' => config('newBugLinks')));
?>
Modified: trunk/Websites/test-results/public/index.html (158094 => 158095)
--- trunk/Websites/test-results/public/index.html 2013-10-27 00:48:30 UTC (rev 158094)
+++ trunk/Websites/test-results/public/index.html 2013-10-27 00:48:54 UTC (rev 158095)
@@ -65,6 +65,7 @@
this._slaves = {};
this._repositories = {};
this._testCategories = {};
+ this._newBugLinks = [];
});
TestResultsView.setAvailableTests = function (availableTests) {
@@ -91,6 +92,10 @@
this._testCategories = testCategories;
}
+TestResultsView.setNewBugLinks = function (newBugLinks) {
+ this._newBugLinks = newBugLinks;
+}
+
TestResultsView.showTooltip = function (anchor, contentElement) {
var tooltipContainer = this._tooltipContainer;
tooltipContainer.style.display = null;
@@ -190,7 +195,7 @@
var self = this;
this._sortObjectsByName(builders).forEach(function (builder) {
- tbody.appendChild(self._createTestResultRow(builder.name, resultsByBuilder[builder.id], builder, buildTimes, repositories));
+ tbody.appendChild(self._createTestResultRow(builder.name, resultsByBuilder[builder.id], test, builder, buildTimes, repositories));
})
table.appendChild(tbody);
@@ -246,7 +251,7 @@
}
}
-TestResultsView._createTestResultRow = function (title, results, builder, buildTimes, repositories) {
+TestResultsView._createTestResultRow = function (title, results, test, builder, buildTimes, repositories) {
var sortedResults = results.sort(function (result1, result2) { return result2.build.time() - result1.build.time(); });
var cells = new Array();
@@ -283,9 +288,12 @@
if (!seenBugLink) {
// FIXME: Make bug tracker configurable.
- formattedModifiers.push(element('a',
- {'href': 'https://bugs.webkit.org/enter_bug.cgi?product=WebKit&component=Tools%20/%20Tests&form_name=enter_bug&keywords=LayoutTestFailure'},
- ['File a bug']));
+ for (var i = 0; i < this._newBugLinks.length; i++) {
+ if (i)
+ formattedModifiers.push(' / ');
+ var link = this._newBugLinks[i];
+ formattedModifiers.push(element('a', {'href': link.url.replace(/\$testName/g, test.name)}, link.label));
+ }
}
var slowestTime = Math.max.apply(Math, results.map(function (result) { return result.roundedTime; }));
@@ -298,6 +306,8 @@
if (repositories) {
var build = sortedResults[0].build;
for (var i = 0; i < repositories.length; i++) {
+ if (!build.revision(repositories[i].id))
+ continue;
var revisionInfo = build.formattedRevision(repositories[i].id);
if (latestRevisions.length)
latestRevisions.push(' / ');
@@ -402,7 +412,7 @@
event.preventDefault();
return false;
}
- tbody.appendChild(self._createTestResultRow(element('span', [testName, externalTestLink]), results, builder));
+ tbody.appendChild(self._createTestResultRow(element('span', [testName, externalTestLink]), results, test, builder));
});
table.appendChild(tbody);
@@ -564,6 +574,7 @@
TestResultsView.setSlaves(mapById(response['slaves']));
TestResultsView.setRepositories(mapById(response['repositories']));
TestResultsView.setTestCategories(response['testCategories']);
+ TestResultsView.setNewBugLinks(response['newBugLinks']);
// FIXME: Updating location.href shouldn't be TestResultsView's responsibility.
var parsedStates = TestResultsView.loadTestsFromLocationHash();
if (parsedStates['builder']) {