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 <script src="../bower_components/sugar/release/sugar-full.development.js"></scri
pt> | 7 <script src="../bower_components/sugar/release/sugar-full.development.js"></scri
pt> |
8 <script src="../scripts/net.js"></script> | 8 <script src="../scripts/net.js"></script> |
9 <script src="../scripts/results.js"></script> | 9 <script src="../scripts/results.js"></script> |
10 <script src="../scripts/ui.js"></script> | 10 <script src="../scripts/ui.js"></script> |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 <div> | 47 <div> |
48 <template if="{{ selected == 0 }}"> | 48 <template if="{{ selected == 0 }}"> |
49 <span><img src="../favicon.ico"> Auto-sheriff-o-maticon</span> | 49 <span><img src="../favicon.ico"> Auto-sheriff-o-maticon</span> |
50 </template> | 50 </template> |
51 <template if="{{ selected == 1 }}"> | 51 <template if="{{ selected == 1 }}"> |
52 <a on-click="{{ onBack }}"> | 52 <a on-click="{{ onBack }}"> |
53 << Go back | 53 << Go back |
54 </a> | 54 </a> |
55 </template> | 55 </template> |
56 </div> | 56 </div> |
57 <!-- FIXME: Use a proper polymer component with data binding. --> | 57 <div> |
58 <select id="tree" on-change="{{ _updateTree }}"> | 58 <ct-last-updated date="{{ lastUpdateDate }}"></ct-last-updated> |
59 <option value="blink">Blink</option> | 59 <!-- FIXME: Use a proper polymer component with data binding. --> |
60 <option value="chromium">Chromium</option> | 60 <select id="tree" on-change="{{ _updateTree }}"> |
61 </select> | 61 <option value="blink">Blink</option> |
| 62 <option value="chromium">Chromium</option> |
| 63 </select> |
| 64 </div> |
62 </header> | 65 </header> |
63 | 66 |
64 <core-animated-pages selected="{{ selected }}" transitions="slide-from-right
"> | 67 <core-animated-pages selected="{{ selected }}" transitions="slide-from-right
"> |
65 <ct-unexpected-failures tree="{{ tree }}" on-ct-examine-failures="{{ onExa
mine }}"></ct-unexpected-failures> | 68 <ct-unexpected-failures tree="{{ tree }}" lastUpdateDate="{{ lastUpdateDat
e }}" on-ct-examine-failures="{{ onExamine }}"></ct-unexpected-failures> |
66 <ct-results-panel failures="{{ currentFailures }}" tree="{{ tree }}"></ct-
results-panel> | 69 <ct-results-panel failures="{{ currentFailures }}" tree="{{ tree }}"></ct-
results-panel> |
67 </core-animated-pages> | 70 </core-animated-pages> |
68 </template> | 71 </template> |
69 <script> | 72 <script> |
70 Polymer({ | 73 Polymer({ |
71 // FIXME: Make chromium the default. | 74 // FIXME: Make chromium the default. |
72 // That requires updating the select to the right value. | 75 // That requires updating the select to the right value. |
73 tree: 'blink', | 76 tree: 'blink', |
74 selected: 0, | 77 selected: 0, |
75 currentFailures: [], | 78 currentFailures: [], |
76 | 79 |
77 _updateTree: function() { | 80 _updateTree: function() { |
78 this.tree = this.$.tree.selectedOptions[0].value; | 81 this.tree = this.$.tree.selectedOptions[0].value; |
79 }, | 82 }, |
80 | 83 |
81 onBack: function() { | 84 onBack: function() { |
82 this.selected = 0; | 85 this.selected = 0; |
83 }, | 86 }, |
84 | 87 |
85 onExamine: function(event) { | 88 onExamine: function(event) { |
86 this.currentFailures = event.detail.failures; | 89 this.currentFailures = event.detail.failures; |
87 this.selected = 1; | 90 this.selected = 1; |
88 }, | 91 }, |
89 }); | 92 }); |
90 </script> | 93 </script> |
91 </polymer-element> | 94 </polymer-element> |
OLD | NEW |