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 14 matching lines...) Expand all Loading... |
25 | 25 |
26 (function() { | 26 (function() { |
27 | 27 |
28 var g_info = null; | 28 var g_info = null; |
29 var g_revisionHint = null; | 29 var g_revisionHint = null; |
30 | 30 |
31 var g_updateTimerId = 0; | 31 var g_updateTimerId = 0; |
32 var g_buildersFailing = null; | 32 var g_buildersFailing = null; |
33 | 33 |
34 var g_unexpectedFailuresController = null; | 34 var g_unexpectedFailuresController = null; |
35 var g_failuresController = null; | |
36 | 35 |
37 var g_nonLayoutTestFailureBuilders = null; | 36 var g_nonLayoutTestFailureBuilders = null; |
38 | 37 |
39 var g_updating = false; | 38 var g_updating = false; |
40 var g_updateButton = null; | 39 var g_updateButton = null; |
41 | 40 |
42 function updatePartyTime() | 41 function updatePartyTime() |
43 { | 42 { |
44 if (!g_unexpectedFailuresController.length() && !g_nonLayoutTestFailureBuild
ers.hasFailures()) | 43 if (!g_unexpectedFailuresController.length() && !g_nonLayoutTestFailureBuild
ers.hasFailures()) |
45 $('#onebar').addClass('partytime'); | 44 $('#onebar').addClass('partytime'); |
(...skipping 27 matching lines...) Expand all Loading... |
73 var updating = new ui.notifications.Info('Loading commit data ...'); | 72 var updating = new ui.notifications.Info('Loading commit data ...'); |
74 | 73 |
75 g_info.add(updating); | 74 g_info.add(updating); |
76 | 75 |
77 builders.buildersFailingNonLayoutTests().then(function(failuresList) { | 76 builders.buildersFailingNonLayoutTests().then(function(failuresList) { |
78 g_nonLayoutTestFailureBuilders.update(failuresList); | 77 g_nonLayoutTestFailureBuilders.update(failuresList); |
79 updatePartyTime(); | 78 updatePartyTime(); |
80 }); | 79 }); |
81 | 80 |
82 Promise.all([model.updateRecentCommits(), model.updateResultsByBuilder()]).t
hen(function() { | 81 Promise.all([model.updateRecentCommits(), model.updateResultsByBuilder()]).t
hen(function() { |
83 if (g_failuresController) | |
84 g_failuresController.update(); | |
85 | |
86 updating.update('Analyzing test failures ...'); | 82 updating.update('Analyzing test failures ...'); |
87 | 83 |
88 model.analyzeUnexpectedFailures(function(failureAnalysis, total) { | 84 model.analyzeUnexpectedFailures(function(failureAnalysis, total) { |
89 updating.update('Analyzing test failures ... ' + ++numberOfTestsAnal
yzed + '/' + total + ' tests analyzed.'); | 85 updating.update('Analyzing test failures ... ' + ++numberOfTestsAnal
yzed + '/' + total + ' tests analyzed.'); |
90 g_unexpectedFailuresController.update(failureAnalysis); | 86 g_unexpectedFailuresController.update(failureAnalysis); |
91 }).then(function() { | 87 }).then(function() { |
92 updatePartyTime(); | 88 updatePartyTime(); |
93 g_unexpectedFailuresController.purge(); | 89 g_unexpectedFailuresController.purge(); |
94 | 90 |
95 Object.keys(config.builders).forEach(function(builderName) { | 91 Object.keys(config.builders).forEach(function(builderName) { |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
147 updateButton.textContent = 'update'; | 143 updateButton.textContent = 'update'; |
148 topBar.appendChild(updateButton); | 144 topBar.appendChild(updateButton); |
149 g_updateButton = updateButton; | 145 g_updateButton = updateButton; |
150 | 146 |
151 var treeStatus = new ui.TreeStatus(); | 147 var treeStatus = new ui.TreeStatus(); |
152 topBar.appendChild(treeStatus); | 148 topBar.appendChild(treeStatus); |
153 | 149 |
154 unexpected.appendChild(g_info); | 150 unexpected.appendChild(g_info); |
155 unexpected.appendChild(unexpectedFailuresView); | 151 unexpected.appendChild(unexpectedFailuresView); |
156 | 152 |
157 var expected = onebar.expected(); | |
158 if (expected) { | |
159 var failuresView = new ui.failures.List(); | |
160 g_failuresController = new controllers.ExpectedFailures(model.state, fai
luresView, onebarController); | |
161 expected.appendChild(failuresView); | |
162 } | |
163 | |
164 update(); | 153 update(); |
165 }); | 154 }); |
166 | 155 |
167 })(); | 156 })(); |
OLD | NEW |