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