OLD | NEW |
---|---|
1 <!-- | 1 <!-- |
2 Copyright 2014 The Chromium Authors. All rights reserved. | 2 Copyright 2014 The Chromium Authors. All rights reserved. |
3 Use of this source code is governed by a BSD-style license that can be | 3 Use of this source code is governed by a BSD-style license that can be |
4 found in the LICENSE file. | 4 found in the LICENSE file. |
5 --> | 5 --> |
6 | 6 |
7 <link rel="import" href="ct-results-comparison.html"> | 7 <link rel="import" href="ct-results-comparison.html"> |
8 | 8 |
9 <polymer-element name="ct-results-detail" attributes="failure builder"> | 9 <polymer-element name="ct-results-detail" attributes="failure builder"> |
10 <template> | 10 <template> |
(...skipping 28 matching lines...) Expand all Loading... | |
39 _kExpectedKind: results.kExpectedKind, | 39 _kExpectedKind: results.kExpectedKind, |
40 _kActualKind: results.kActualKind, | 40 _kActualKind: results.kActualKind, |
41 _kDiffKind: results.kDiffKind, | 41 _kDiffKind: results.kDiffKind, |
42 _kUnknownKind: results.kUnknownKind, | 42 _kUnknownKind: results.kUnknownKind, |
43 | 43 |
44 observe: { | 44 observe: { |
45 failure: '_update', | 45 failure: '_update', |
46 builder: '_update', | 46 builder: '_update', |
47 }, | 47 }, |
48 | 48 |
49 _isStdioStep: function(result, step) { | |
ojan
2014/09/11 18:09:08
This is fine, especially since this code needs to
| |
50 return result.actual == 'UNKNOWN' || step == 'compile'; | |
51 }, | |
52 | |
49 _update: function() { | 53 _update: function() { |
50 if (!this.failure || !this.builder) | 54 if (!this.failure || !this.builder) |
51 return; | 55 return; |
52 | 56 |
53 // FIXME: If the types of groups doesn't change, then it'd be better to do this | 57 // FIXME: If the types of groups doesn't change, then it'd be better to do this |
54 // update in place so that the user doesn't see a flicker. | 58 // update in place so that the user doesn't see a flicker. |
55 this._urlGroups = []; | 59 this._urlGroups = []; |
56 | 60 |
57 var result = this.failure.resultNodesByBuilder[this.builder]; | 61 var result = this.failure.resultNodesByBuilder[this.builder]; |
58 // FIXME: There's probably a less hacky way to check this. | 62 // FIXME: There's probably a less hacky way to check this. |
59 if (result.actual == 'FAIL' || result.actual == 'UNKNOWN') | 63 if (result.actual == 'FAIL' || this._isStdioStep(result, this.failure.st ep)) |
60 this._updateUrls(); | 64 this._updateUrls(); |
61 else | 65 else |
62 this._updateWebkitTestUrls(); | 66 this._updateWebkitTestUrls(); |
63 }, | 67 }, |
64 | 68 |
65 _updateWebkitTestUrls: function() { | 69 _updateWebkitTestUrls: function() { |
66 var result = this.failure.resultNodesByBuilder[this.builder]; | 70 var result = this.failure.resultNodesByBuilder[this.builder]; |
67 var failureInfo = results.failureInfo(this.failure.testName, this.builde r, result.actual); | 71 var failureInfo = results.failureInfo(this.failure.testName, this.builde r, result.actual); |
68 | 72 |
69 // FIXME: Move this logic to a proper model class so that the network re quests this makes | 73 // FIXME: Move this logic to a proper model class so that the network re quests this makes |
(...skipping 17 matching lines...) Expand all Loading... | |
87 }, | 91 }, |
88 | 92 |
89 _updateUrls: function() { | 93 _updateUrls: function() { |
90 // FIXME: Along with _updateWebkitTestUrls, move this logic to a proper model class | 94 // FIXME: Along with _updateWebkitTestUrls, move this logic to a proper model class |
91 // so that the network requests this makes can be easily mocked out in t ests. | 95 // so that the network requests this makes can be easily mocked out in t ests. |
92 | 96 |
93 var result = this.failure.resultNodesByBuilder[this.builder]; | 97 var result = this.failure.resultNodesByBuilder[this.builder]; |
94 | 98 |
95 // FIXME: We only store build logs by the test name, not the testsuite.t estname, | 99 // FIXME: We only store build logs by the test name, not the testsuite.t estname, |
96 // which means that two failing tests from different test suites conflic t! | 100 // which means that two failing tests from different test suites conflic t! |
97 var testPart = result.actual == 'UNKNOWN' ? 'stdio' : this.failure.testN ame.split('.')[1]; | 101 var testPart = this._isStdioStep(result, this.failure.step) ? 'stdio' : this.failure.testName.split('.')[1]; |
98 var url = result.masterUrl + | 102 var url = result.masterUrl + |
99 '/builders/' + encodeURIComponent(this.builder) + | 103 '/builders/' + encodeURIComponent(this.builder) + |
100 '/builds/' + result.lastFailingBuild + | 104 '/builds/' + result.lastFailingBuild + |
101 '/steps/' + this.failure.step + | 105 '/steps/' + this.failure.step + |
102 '/logs/' + testPart; | 106 '/logs/' + testPart; |
103 | 107 |
104 var resultsUrlsByKind = {}; | 108 var resultsUrlsByKind = {}; |
105 resultsUrlsByKind[this._kUnknownKind] = url; | 109 resultsUrlsByKind[this._kUnknownKind] = url; |
106 | 110 |
107 this._urlGroups.push({ | 111 this._urlGroups.push({ |
108 type: results.kTextType, | 112 type: results.kTextType, |
109 urls: resultsUrlsByKind, | 113 urls: resultsUrlsByKind, |
110 }); | 114 }); |
111 }, | 115 }, |
112 }); | 116 }); |
113 </script> | 117 </script> |
114 </polymer-element> | 118 </polymer-element> |
OLD | NEW |