Thu, 15 Jan 2015 21:13:52 +0100
Remove forgotten relic of ABI crash risk averse overloaded method change.
michael@0 | 1 | <!DOCTYPE html> |
michael@0 | 2 | <!-- This test checks to be sure we can render SVG-as-an-image |
michael@0 | 3 | from a 'blob' URI. --> |
michael@0 | 4 | <html class="reftest-wait"> |
michael@0 | 5 | <head> |
michael@0 | 6 | <script> |
michael@0 | 7 | function go() { |
michael@0 | 8 | // Generate a blob URL encoding of an SVG document |
michael@0 | 9 | var blobURL = generateBlobURL(); |
michael@0 | 10 | |
michael@0 | 11 | // Tell our img element to render the URL |
michael@0 | 12 | var img = document.getElementsByTagName("img")[0] |
michael@0 | 13 | img.src = blobURL; |
michael@0 | 14 | |
michael@0 | 15 | // Once our img loads, take reftest snapshot. |
michael@0 | 16 | img.addEventListener("load", function() { |
michael@0 | 17 | document.documentElement.removeAttribute("class"); |
michael@0 | 18 | }); |
michael@0 | 19 | } |
michael@0 | 20 | |
michael@0 | 21 | // Helper function -- returns a blob URL representing a |
michael@0 | 22 | // 100x100 fully-lime SVG document. |
michael@0 | 23 | function generateBlobURL() { |
michael@0 | 24 | var svg = |
michael@0 | 25 | '<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100">' + |
michael@0 | 26 | '<rect height="100%" width="100%" fill="lime"/>' + |
michael@0 | 27 | '</svg>'; |
michael@0 | 28 | return self.URL.createObjectURL(new Blob([svg], {type: "image/svg+xml"})); |
michael@0 | 29 | } |
michael@0 | 30 | </script> |
michael@0 | 31 | </head> |
michael@0 | 32 | <body onload="go()"> |
michael@0 | 33 | <img src=""> |
michael@0 | 34 | </body> |
michael@0 | 35 | </html> |