2 <?xml-stylesheet href=
"chrome://global/skin" type=
"text/css"?>
3 <?xml-stylesheet href=
"chrome://mochikit/content/tests/SimpleTest/test.css"
6 <window xmlns=
"http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
8 <script src=
"chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
10 <body xmlns=
"http://www.w3.org/1999/xhtml">
12 <div id=
"content" style=
"display: none"/>
15 <script type=
"application/javascript">
16 function getLoadContext() {
17 return window.docShell.QueryInterface(Ci.nsILoadContext);
20 var transferable = Cc['@mozilla.org/widget/transferable;
1']
21 .createInstance(Ci.nsITransferable);
22 transferable.init(getLoadContext());
24 transferable.addDataFlavor(
"text/plain");
25 transferable.setTransferData(
"text/plain", document);
27 Services.clipboard.setData(transferable, null, Ci.nsIClipboard.kGlobalClipboard);
29 transferable.setTransferData(
"text/plain", null);
31 SimpleTest.ok(true,
"Didn't crash setting non-text data for text/plain type");