/third_party/WebKit/LayoutTests/http/tests/fileapi/create-blob-url-from-data-url.html
HTML | 33 lines | 31 code | 2 blank | 0 comment | 0 complexity | f9195b3059eaae03f5b80b18957f5b8a MD5 | raw file
- <html>
- <head>
- <script type="text/javascript">
- function log(message)
- {
- document.getElementById('console').appendChild(document.createTextNode(message + "\n"));
- }
- if (window.testRunner) {
- testRunner.dumpAsText();
- testRunner.waitUntilDone();
- }
- var t = setInterval(function(){
- if (!location.hash)
- return;
- var blobURL = location.hash.substr(1);
- if (blobURL == "null")
- log("FAIL: no blob URL is created");
- else
- log("PASS: created blob URL");
- clearInterval(t);
- if (window.testRunner)
- testRunner.notifyDone();
- }, 100)
- </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,%3Cscript%3Evar%20bb%20%3D%20new%20Blob%28%5B%22Foo%22%5D%2C%20%7Btype%3A%22text%2Fhtml%22%7D%29%3Btop.location%3D%27http%3A%2F%2F127.0.0.1%3A8000%2Ffileapi%2Fcreate-blob-url-from-data-url.html%23%27%20%2B%20window.URL.createObjectURL%28bb%29%3B%3C%2Fscript%3E"></iframe>
- </body>
- </html>