Thu, 22 Jan 2015 13:21:57 +0100
Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6
1 <!doctype html>
2 <html>
3 <head>
4 <script type="application/javascript">
6 // Set up the objects for cloning.
7 function setup() {
8 window.testObject = { myNumber: 42,
9 myDomain: window.location.domain };
10 window.blob = new Blob([], { type: 'text/plain' });
11 window.fileList = document.getElementById('fileinput').files;
12 }
14 // Called by the chrome parent window.
15 function tryToClone(obj, shouldSucceed, message) {
16 var success = false;
17 var sink = window.frames[0];
18 try { sink.postMessage(obj, '*'); success = true; }
19 catch (e) { message = message + ' (threw: ' + e.message + ')'; }
20 is(success, shouldSucceed, message);
21 }
23 </script>
24 </head>
25 <body onload="setup()">
26 <input id="fileinput" type="file"></input>
27 <iframe id="sink">
28 </body>
29 </html>