OLD | NEW |
1 <script src="../../resources/testharness.js"></script> | 1 <script src="../../resources/testharness.js"></script> |
2 <script src="test-helpers.js"></script> | 2 <script src="test-helpers.js"></script> |
3 <body> | 3 <body> |
4 <script> | 4 <script> |
5 | 5 |
6 function load_image(url, cross_origin) { | 6 function load_image(url, cross_origin) { |
7 var img = document.createElement('img'); | 7 var img = document.createElement('img'); |
8 if (cross_origin != '') { | 8 if (cross_origin != '') { |
9 img.crossOrigin = cross_origin; | 9 img.crossOrigin = cross_origin; |
10 } | 10 } |
(...skipping 30 matching lines...) Expand all Loading... |
41 document.body.appendChild(div); | 41 document.body.appendChild(div); |
42 div.style[type] = 'url(' + url + ')'; | 42 div.style[type] = 'url(' + url + ')'; |
43 } | 43 } |
44 | 44 |
45 function load_css_image_set(url, type) { | 45 function load_css_image_set(url, type) { |
46 var div = document.createElement('div'); | 46 var div = document.createElement('div'); |
47 document.body.appendChild(div); | 47 document.body.appendChild(div); |
48 div.style[type] = '-webkit-image-set(url(' + url + ') 1x)'; | 48 div.style[type] = '-webkit-image-set(url(' + url + ') 1x)'; |
49 } | 49 } |
50 | 50 |
51 function load_audio(url, cross_origin) { | |
52 var audio = document.createElement('audio'); | |
53 if (cross_origin != '') { | |
54 audio.crossOrigin = cross_origin; | |
55 } | |
56 audio.src = url; | |
57 document.body.appendChild(audio); | |
58 } | |
59 </script> | 51 </script> |
60 </body> | 52 </body> |
OLD | NEW |