Backed out changeset 2450366cf7ca (bug 1891629) for causing win msix mochitest failures
[gecko.git] / dom / base / test / test_sandbox_structuredclone.html
blob38663d7a037c24e370a39dced5cf1eceb0dda5a4
1 <!DOCTYPE HTML>
2 <html>
3 <head>
4 <title>Test for structured clone deserialization in a sandbox</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>
10 <script type="application/javascript">
11 "use strict";
13 let sandbox = new Cu.Sandbox(window, { sandboxPrototype: window });
14 let holder = new StructuredCloneHolder("", "", new Blob([]), sandbox);
15 let result = holder.deserialize(sandbox);
16 ok(sandbox.Blob.isInstance(result),
17 "Deserializing into a sandbox with a DOM global as its prototype should work");
19 </script>
20 </body>
21 </html>