| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 75 return Object.keys(this._resultsByTest[testName]).map(function(builderNa
me) { | 75 return Object.keys(this._resultsByTest[testName]).map(function(builderNa
me) { |
| 76 return results.failureInfoForTestAndBuilder(this._resultsByTest, tes
tName, builderName); | 76 return results.failureInfoForTestAndBuilder(this._resultsByTest, tes
tName, builderName); |
| 77 }.bind(this)); | 77 }.bind(this)); |
| 78 }, | 78 }, |
| 79 onUpdateExpectations: function() | 79 onUpdateExpectations: function() |
| 80 { | 80 { |
| 81 updateExpectationsWithStatusUpdates(this._failureInfoList()); | 81 updateExpectationsWithStatusUpdates(this._failureInfoList()); |
| 82 } | 82 } |
| 83 }); | 83 }); |
| 84 | 84 |
| 85 controllers.ExpectedFailures = base.extends(Object, { | |
| 86 init: function(model, view, delegate) | |
| 87 { | |
| 88 this._model = model; | |
| 89 this._view = view; | |
| 90 this._delegate = delegate; | |
| 91 }, | |
| 92 update: function() | |
| 93 { | |
| 94 var expectedFailures = results.expectedFailuresByTest(this._model.result
sByBuilder); | |
| 95 var failingTestsList = Object.keys(expectedFailures); | |
| 96 | |
| 97 $(this._view).empty(); | |
| 98 base.forEachDirectory(failingTestsList, function(label, testsFailingInDi
rectory) { | |
| 99 var listItem = new ui.failures.ListItem(label, testsFailingInDirecto
ry); | |
| 100 this._view.appendChild(listItem); | |
| 101 $(listItem).bind('examine', function() { | |
| 102 this.onExamine(testsFailingInDirectory); | |
| 103 }.bind(this)); | |
| 104 }.bind(this)); | |
| 105 }, | |
| 106 onExamine: function(failingTestsList) | |
| 107 { | |
| 108 var resultsView = new ui.results.View({ | |
| 109 fetchResultsURLs: results.fetchResultsURLs | |
| 110 }); | |
| 111 var failuresByTest = base.filterDictionary( | |
| 112 results.expectedFailuresByTest(this._model.resultsByBuilder), | |
| 113 function(key) { | |
| 114 return failingTestsList.indexOf(key) != -1; | |
| 115 }); | |
| 116 var controller = new controllers.ResultsDetails(resultsView, failuresByT
est); | |
| 117 this._delegate.showResults(resultsView); | |
| 118 } | |
| 119 }); | |
| 120 | |
| 121 var FailureStreamController = base.extends(Object, { | 85 var FailureStreamController = base.extends(Object, { |
| 122 _resultsFilter: null, | 86 _resultsFilter: null, |
| 123 _keyFor: function(failureAnalysis) { throw "Not implemented!"; }, | 87 _keyFor: function(failureAnalysis) { throw "Not implemented!"; }, |
| 124 _createFailureView: function(failureAnalysis) { throw "Not implemented!"; }, | 88 _createFailureView: function(failureAnalysis) { throw "Not implemented!"; }, |
| 125 | 89 |
| 126 init: function(model, view, delegate) | 90 init: function(model, view, delegate) |
| 127 { | 91 { |
| 128 this._model = model; | 92 this._model = model; |
| 129 this._view = view; | 93 this._view = view; |
| 130 this._delegate = delegate; | 94 this._delegate = delegate; |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 240 this._notification = new ui.notifications.BuildersFailing(this._mess
age); | 204 this._notification = new ui.notifications.BuildersFailing(this._mess
age); |
| 241 this._view.add(this._notification); | 205 this._view.add(this._notification); |
| 242 } | 206 } |
| 243 // FIXME: We should provide regression ranges for the failing builders. | 207 // FIXME: We should provide regression ranges for the failing builders. |
| 244 // This doesn't seem to happen often enough to worry too much about that
, however. | 208 // This doesn't seem to happen often enough to worry too much about that
, however. |
| 245 this._notification.setFailingBuilders(failuresList); | 209 this._notification.setFailingBuilders(failuresList); |
| 246 } | 210 } |
| 247 }); | 211 }); |
| 248 | 212 |
| 249 })(); | 213 })(); |
| OLD | NEW |