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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
49 _update: function() { | 49 _update: function() { |
50 if (!this.failure || !this.builder) | 50 if (!this.failure || !this.builder) |
51 return; | 51 return; |
52 | 52 |
53 // FIXME: If the types of groups doesn't change, then it'd be better to do this | 53 // 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. | 54 // update in place so that the user doesn't see a flicker. |
55 this._urlGroups = []; | 55 this._urlGroups = []; |
56 | 56 |
57 var result = this.failure.resultNodesByBuilder[this.builder]; | 57 var result = this.failure.resultNodesByBuilder[this.builder]; |
58 // FIXME: There's probably a less hacky way to check this. | 58 // FIXME: There's probably a less hacky way to check this. |
59 if (result.actual == 'FAIL' || result.actual == 'UNKNOWN') | 59 if (result.actual == 'FAIL' || result.actual == 'UNKNOWN' || |
60 this.failure.step == 'compile') | |
60 this._updateUrls(); | 61 this._updateUrls(); |
61 else | 62 else |
62 this._updateWebkitTestUrls(); | 63 this._updateWebkitTestUrls(); |
63 }, | 64 }, |
64 | 65 |
65 _updateWebkitTestUrls: function() { | 66 _updateWebkitTestUrls: function() { |
66 var result = this.failure.resultNodesByBuilder[this.builder]; | 67 var result = this.failure.resultNodesByBuilder[this.builder]; |
67 var failureInfo = results.failureInfo(this.failure.testName, this.builde r, result.actual); | 68 var failureInfo = results.failureInfo(this.failure.testName, this.builde r, result.actual); |
68 | 69 |
69 // FIXME: Move this logic to a proper model class so that the network re quests this makes | 70 // 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 }, | 88 }, |
88 | 89 |
89 _updateUrls: function() { | 90 _updateUrls: function() { |
90 // FIXME: Along with _updateWebkitTestUrls, move this logic to a proper model class | 91 // 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. | 92 // so that the network requests this makes can be easily mocked out in t ests. |
92 | 93 |
93 var result = this.failure.resultNodesByBuilder[this.builder]; | 94 var result = this.failure.resultNodesByBuilder[this.builder]; |
94 | 95 |
95 // FIXME: We only store build logs by the test name, not the testsuite.t estname, | 96 // 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! | 97 // 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]; | 98 var use_stdio = result.actual == 'UNKNOWN' || this.failure.step == 'comp ile'; |
ojan
2014/09/11 01:58:41
Lets make a helper function to avoid code duplicat
| |
99 var testPart = use_stdio ? 'stdio' : this.failure.testName.split('.')[1] ; | |
98 var url = result.masterUrl + | 100 var url = result.masterUrl + |
99 '/builders/' + encodeURIComponent(this.builder) + | 101 '/builders/' + encodeURIComponent(this.builder) + |
100 '/builds/' + result.lastFailingBuild + | 102 '/builds/' + result.lastFailingBuild + |
101 '/steps/' + this.failure.step + | 103 '/steps/' + this.failure.step + |
102 '/logs/' + testPart; | 104 '/logs/' + testPart; |
103 | 105 |
104 var resultsUrlsByKind = {}; | 106 var resultsUrlsByKind = {}; |
105 resultsUrlsByKind[this._kUnknownKind] = url; | 107 resultsUrlsByKind[this._kUnknownKind] = url; |
106 | 108 |
107 this._urlGroups.push({ | 109 this._urlGroups.push({ |
108 type: results.kTextType, | 110 type: results.kTextType, |
109 urls: resultsUrlsByKind, | 111 urls: resultsUrlsByKind, |
110 }); | 112 }); |
111 }, | 113 }, |
112 }); | 114 }); |
113 </script> | 115 </script> |
114 </polymer-element> | 116 </polymer-element> |
OLD | NEW |