test_sandboxed_blob_uri.html (655B)
1 <!DOCTYPE HTML> 2 <html> 3 <head> 4 <title>Test for Principal in MessageManager</title> 5 <script src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script> 6 <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"?> 7 </head> 8 <body> 9 10 <script type="application/javascript"> 11 "use strict"; 12 13 var sb = new Cu.Sandbox('https://example.com', { wantGlobalProperties: [ 'Blob', 'URL' ] }); 14 Cu.evalInSandbox('var u = URL.createObjectURL(new Blob(["text"], { type: "text/plain" }));', sb); 15 Cu.nukeSandbox(sb); 16 Cu.forceCC(); 17 18 ok(true, "are we leaking blobs?"); 19 20 </script> 21 </body> 22 </html>