OLD | NEW |
(Empty) | |
| 1 <!-- |
| 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 |
| 4 found in the LICENSE file. |
| 5 --> |
| 6 |
| 7 <polymer-element name="ct-test-output" attributes="type url"> |
| 8 <template> |
| 9 <style> |
| 10 .result { |
| 11 border: 1px solid gray; |
| 12 } |
| 13 iframe { |
| 14 border: none; |
| 15 width: 100%; |
| 16 height: 400px; |
| 17 } |
| 18 img { |
| 19 width: 100%; |
| 20 } |
| 21 </style> |
| 22 |
| 23 <div class="result"> |
| 24 <template if="{{url}}"> |
| 25 <template if="{{type == _kImageType}}"> |
| 26 <img src="{{url}}"> |
| 27 </template> |
| 28 <template if="{{type == _kTextType}}"> |
| 29 <iframe src="{{url}}"></iframe> |
| 30 </template> |
| 31 <template if="{{type == _kAudioType}}"> |
| 32 <audio controls src="{{url}}"></audio> |
| 33 </template> |
| 34 </template> |
| 35 </div> |
| 36 </template> |
| 37 <script> |
| 38 Polymer({ |
| 39 type: '', |
| 40 url: '', |
| 41 _kAudioType: results.kAudioType, |
| 42 _kImageType: results.kImageType, |
| 43 _kTextType: results.kTextType, |
| 44 }); |
| 45 </script> |
| 46 </polymer-element> |
OLD | NEW |