Changeset 95066 in webkit
- Timestamp:
- Sep 13, 2011 6:20:29 PM (13 years ago)
- Location:
- trunk/Tools
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/checkout.js
r94314 r95066 105 105 }; 106 106 107 checkout.rebaseline = function(failureInfoList, callback )107 checkout.rebaseline = function(failureInfoList, callback, progressCallback) 108 108 { 109 109 callIfCheckoutAvailable(function() { … … 113 113 'test': failureInfo.testName, 114 114 }), function() { 115 if (progressCallback) 116 progressCallback(failureInfo); 115 117 callback(); 116 118 }); -
trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/controllers.js
r94722 r95066 28 28 (function(){ 29 29 30 // FIXME: Where should this function go? 31 function rebaselineWithStatusUpdates(failureInfoList) 32 { 33 var statusView = new ui.MessageBox( 34 'Rebaseline status', 35 'Performing rebaseline...'); 36 37 checkout.rebaseline(failureInfoList, function() { 38 statusView.addMessage('Rebaseline done! Please land with "webkit-patch land-cowboy".'); 39 40 statusView.addActionList(new ui.actions.List([new ui.actions.Close()])); 41 $(statusView).bind('close', statusView.close.bind(statusView)); 42 }, function(failureInfo) { 43 statusView.addMessage(failureInfo.testName + ' on ' + ui.displayNameForBuilder(failureInfo.builderName)); 44 }); 45 } 46 30 47 controllers.ResultsDetails = base.extends(Object, { 31 48 init: function(view, resultsByTest) … … 56 73 } 57 74 }); 58 checkout.rebaseline(failureInfoList, function() { 59 // FIXME: We should have a better dialog than this! 60 alert('Rebaseline done! Please land with "webkit-patch land-cowboy".'); 61 }); 75 rebaselineWithStatusUpdates(failureInfoList); 62 76 } 63 77 }); … … 120 134 { 121 135 var failureInfoList = base.flattenArray(failures.testNameList().map(model.unexpectedFailureInfoForTestName)); 122 checkout.rebaseline(failureInfoList, function() { 123 // FIXME: We should have a better dialog than this! 124 alert('Rebaseline done! Please land with "webkit-patch land-cowboy".'); 125 }); 136 rebaselineWithStatusUpdates(failureInfoList); 126 137 } 127 138 }); -
trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/ui.js
r94540 r95066 133 133 }); 134 134 135 ui.MessageBox = base.extends('div', { 136 init: function(title, message) 137 { 138 this._content = document.createElement('div'); 139 this.appendChild(this._content); 140 this.addMessage(message); 141 document.body.appendChild(this); 142 $(this).dialog({ 143 resizable: false, 144 title: title, 145 width: $(window).width() * 0.80, // FIXME: We should have CSS do this work for us. 146 }); 147 $(this).bind('dialogclose', function() { 148 $(this).detach(); 149 }.bind(this)); 150 }, 151 close: function() 152 { 153 $(this).dialog('close'); 154 }, 155 addMessage: function(message) 156 { 157 var element = document.createElement('div'); 158 $(element).addClass('message').text(message); 159 this._content.appendChild(element); 160 }, 161 addActionList: function(actionList) 162 { 163 this.appendChild(actionList); 164 } 165 }); 166 135 167 })(); -
trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/ui/actions.js
r94722 r95066 51 51 this._eventName = 'blame'; 52 52 this.title = 'Blames this failure on this revision.' 53 } 54 }); 55 56 ui.actions.Close = base.extends(Action, { 57 init: function() { 58 this.textContent = 'Close'; 59 this._eventName = 'close'; 53 60 } 54 61 }); -
trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/ui_unittests.js
r94150 r95066 115 115 }); 116 116 117 test("MessageBox", 1, function() { 118 var messageBox = new ui.MessageBox('The Title', 'First message'); 119 messageBox.addMessage('Second Message'); 120 equal(messageBox.outerHTML, 121 '<div class="ui-dialog-content ui-widget-content" style="width: auto; min-height: 132px; height: auto; " scrolltop="0" scrollleft="0">' + 122 '<div>' + 123 '<div class="message">First message</div>' + 124 '<div class="message">Second Message</div>' + 125 '</div>' + 126 '</div>'); 127 messageBox.close(); 128 }); 129 117 130 })(); -
trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/styles/results.css
r94722 r95066 24 24 */ 25 25 26 .results-view ul.actions {26 .results-view ul.actions, .ui-dialog ul.actions { 27 27 float: right; 28 28 margin: 0; … … 32 32 } 33 33 34 .results-view ul.actions li {34 .results-view ul.actions li, .ui-dialog ul.actions li { 35 35 display: inline-block; 36 36 } -
trunk/Tools/ChangeLog
r95062 r95066 1 2011-09-13 Adam Barth <abarth@webkit.org> 2 3 garden-o-matic should tell you about the progress of your rebaseline 4 https://bugs.webkit.org/show_bug.cgi?id=67967 5 6 Reviewed by Dimitri Glazkov. 7 8 This patch adds ui.MessageBox, which is a light wrapper around jQuery 9 UI's dialog widget. We then use ui.MessageBox to show status messages 10 about in-progress rebaselines. As each baseline is downloaded, the 11 MessageBox updates. This UI replaces our temporary "alert"-based UI. 12 13 * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/checkout.js: 14 * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/controllers.js: 15 * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/ui.js: 16 * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/ui/actions.js: 17 * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/ui_unittests.js: 18 * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/styles/results.css: 19 1 20 2011-09-13 Leandro Pereira <leandro@profusion.mobi> 2 21
Note: See TracChangeset
for help on using the changeset viewer.