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