Backed out changeset 2450366cf7ca (bug 1891629) for causing win msix mochitest failures
[gecko.git] / widget / tests / test_bug673301.xhtml
blob663f18397e46eb3370ec1165ad64e3524ba896d9
1 <?xml version="1.0"?>
2 <?xml-stylesheet href="chrome://global/skin" type="text/css"?>
3 <?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css"
4 type="text/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">
11 <p id="display"></p>
12 <div id="content" style="display: none"/>
13 </body>
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");
32 </script>
33 </window>