Title: [90594] trunk/Tools
- Revision
- 90594
- Author
- [email protected]
- Date
- 2011-07-07 15:20:21 -0700 (Thu, 07 Jul 2011)
Log Message
Update TestFailures's title and header immediately upon navigation
Fixes <http://webkit.org/b/64125> TestFailures page seems slow to react on link clicks
Reviewed by Daniel Bates.
* BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/ViewController.js:
(ViewController.prototype.loaded): Create and store an h1 element for displaying the page's
title.
(ViewController.prototype._displayBuilder): Set the page's title and clear out any old
content immediately instead of waiting for the first set of results for the history
analyzer. As we receive new results from the analyzer we'll just clear out the main content
area and replace it with the new info.
(ViewController.prototype._displayTesters): Set the page's title and clear out any old
content immediately instead of waiting for the list of testers from the buildbot. Sprinkled
in a little use of our removeAllChildren helper, too.
(ViewController.prototype._setTitle): Added. Set's the page's title and the header text.
Modified Paths
Diff
Modified: trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/ViewController.js (90593 => 90594)
--- trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/ViewController.js 2011-07-07 22:09:50 UTC (rev 90593)
+++ trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/ViewController.js 2011-07-07 22:20:21 UTC (rev 90594)
@@ -36,6 +36,8 @@
ViewController.prototype = {
loaded: function() {
+ this._header = document.createElement('h1');
+ document.body.appendChild(this._header);
this._mainContentElement = document.createElement('div');
document.body.appendChild(this._mainContentElement);
document.body.appendChild(this._domForAuxiliaryUIElements());
@@ -54,7 +56,11 @@
},
_displayBuilder: function(builder) {
+ this._setTitle(builder.name);
+ this._mainContentElement.removeAllChildren();
+
var navigationID = this._navigationID;
+
var self = this;
(new LayoutTestHistoryAnalyzer(builder)).start(function(data, stillFetchingData) {
if (self._navigationID !== navigationID) {
@@ -99,11 +105,7 @@
item.appendChild(self._domForNewAndExistingBugs(builder, buildName, passingBuildName, failingTestNames));
});
- var header = document.createElement('h1');
- header.appendChild(document.createTextNode(builder.name));
- self._mainContentElement.innerHTML = '';
- document.title = builder.name;
- self._mainContentElement.appendChild(header);
+ self._mainContentElement.removeAllChildren();
self._mainContentElement.appendChild(list);
self._mainContentElement.appendChild(self._domForPossiblyFlakyTests(builder, data.possiblyFlaky));
@@ -115,15 +117,18 @@
},
_displayTesters: function() {
- var navigationID = this._navigationID;
+ this._setTitle('Testers');
+ this._mainContentElement.removeAllChildren();
var list = document.createElement('ul');
+ this._mainContentElement.appendChild(list);
+
var latestBuildInfos = [];
+ var navigationID = this._navigationID;
function updateList() {
latestBuildInfos.sort(function(a, b) { return a.tester.name.localeCompare(b.tester.name) });
- while (list.firstChild)
- list.removeChild(list.firstChild);
+ list.removeAllChildren();
latestBuildInfos.forEach(function(buildInfo) {
var link = document.createElement('a');
link.href = '' + buildInfo.tester.name;
@@ -161,10 +166,6 @@
});
});
});
-
- self._mainContentElement.innerHTML = '';
- document.title = 'Testers';
- self._mainContentElement.appendChild(list);
});
},
@@ -520,4 +521,9 @@
return result;
},
+
+ _setTitle: function(title) {
+ document.title = title;
+ this._header.textContent = title;
+ },
};
Modified: trunk/Tools/ChangeLog (90593 => 90594)
--- trunk/Tools/ChangeLog 2011-07-07 22:09:50 UTC (rev 90593)
+++ trunk/Tools/ChangeLog 2011-07-07 22:20:21 UTC (rev 90594)
@@ -1,5 +1,25 @@
2011-07-07 Adam Roben <[email protected]>
+ Update TestFailures's title and header immediately upon navigation
+
+ Fixes <http://webkit.org/b/64125> TestFailures page seems slow to react on link clicks
+
+ Reviewed by Daniel Bates.
+
+ * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/ViewController.js:
+ (ViewController.prototype.loaded): Create and store an h1 element for displaying the page's
+ title.
+ (ViewController.prototype._displayBuilder): Set the page's title and clear out any old
+ content immediately instead of waiting for the first set of results for the history
+ analyzer. As we receive new results from the analyzer we'll just clear out the main content
+ area and replace it with the new info.
+ (ViewController.prototype._displayTesters): Set the page's title and clear out any old
+ content immediately instead of waiting for the list of testers from the buildbot. Sprinkled
+ in a little use of our removeAllChildren helper, too.
+ (ViewController.prototype._setTitle): Added. Set's the page's title and the header text.
+
+2011-07-07 Adam Roben <[email protected]>
+
Make Checkout use SCM's Executive instead of conjuring up its own
This will improve integration with the rest of webkitpy, particularly when invoked via
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes