| <html> |
| <head> |
| <script type="text/javascript"> |
| function log(message) |
| { |
| document.getElementById('console').appendChild(document.createTextNode(message + "\n")); |
| } |
| |
| if (window.testRunner) { |
| testRunner.dumpAsText(); |
| testRunner.waitUntilDone(); |
| } |
| |
| function blobSent(event) { |
| var blobURL = event.data.blobURL; |
| if (blobURL == "null") |
| log("FAIL: no blob URL is created"); |
| else |
| log("PASS: created blob URL"); |
| if (window.testRunner) |
| testRunner.notifyDone(); |
| }; |
| |
| window.addEventListener("message", blobSent, false); |
| </script> |
| </head> |
| <body> |
| <p> Test case for checking blob URL can be created from the code running from data URI</p> |
| <pre id='console'></pre> |
| <iframe src="data:text/html,<body><script>var bb = new Blob(['Foo'], {type:'text/html'}); top.postMessage({blobURL: window.URL.createObjectURL(bb)}, '*');</script></body>"></iframe> |
| </body> |
| </html> |