PageRenderTime 26ms CodeModel.GetById 22ms RepoModel.GetById 0ms app.codeStats 0ms

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

https://bitbucket.org/zenoalbisser/webkit
HTML | 33 lines | 31 code | 2 blank | 0 comment | 0 complexity | f7e43d0c3bb55cd24a7338d890d4bd73 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.layoutTestController) {
  9. layoutTestController.dumpAsText();
  10. layoutTestController.waitUntilDone();
  11. }
  12. var t = setInterval(function(){
  13. if (!location.hash)
  14. return;
  15. var blobURL = location.hash.substr(1);
  16. if (blobURL == "undefined")
  17. log("PASS: no blob URL is created");
  18. else
  19. log("FAIL: created " + blobURL);
  20. clearInterval(t);
  21. if (window.layoutTestController)
  22. layoutTestController.notifyDone();
  23. }, 100)
  24. </script>
  25. </head>
  26. <body>
  27. <p> Test case for checking blob URL not allowed to be created from the code running from data URI</p>
  28. <pre id='console'></pre>
  29. <iframe src="data:text/html,%3Cscript%3Evar%20b%20%3D%20new%20WebKitBlobBuilder()%3Bb.append(%22Foo%22)%3Bvar%20bb%20%3D%20b.getBlob('text%2Fhtml')%3Btop.location%3D'http%3A%2F%2F127.0.0.1%3A8000%2Ffileapi%2Fcreate-blob-url-from-data-url.html%23'%20%2B%20window.webkitURL.createObjectURL(bb)%3B%3C%2Fscript%3E"></iframe>
  30. </body>
  31. </html>