PageRenderTime 23ms CodeModel.GetById 29ms RepoModel.GetById 1ms app.codeStats 0ms

/third_party/WebKit/LayoutTests/http/tests/fileapi/create-blob-url-from-data-url.html

https://gitlab.com/jonnialva90/iridium-browser
HTML | 33 lines | 31 code | 2 blank | 0 comment | 0 complexity | f9195b3059eaae03f5b80b18957f5b8a MD5 | raw file
  1. <html>
  2. <head>
  3. <script type="text/javascript">
  4. function log(message)
  5. {
  6. document.getElementById('console').appendChild(document.createTextNode(message + "\n"));
  7. }
  8. if (window.testRunner) {
  9. testRunner.dumpAsText();
  10. testRunner.waitUntilDone();
  11. }
  12. var t = setInterval(function(){
  13. if (!location.hash)
  14. return;
  15. var blobURL = location.hash.substr(1);
  16. if (blobURL == "null")
  17. log("FAIL: no blob URL is created");
  18. else
  19. log("PASS: created blob URL");
  20. clearInterval(t);
  21. if (window.testRunner)
  22. testRunner.notifyDone();
  23. }, 100)
  24. </script>
  25. </head>
  26. <body>
  27. <p> Test case for checking blob URL can be created from the code running from data URI</p>
  28. <pre id='console'></pre>
  29. <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>
  30. </body>
  31. </html>