2011-08-18 17:22:52 +04:00
|
|
|
<?xml version="1.0"?>
|
|
|
|
<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
|
|
|
|
<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css"
|
|
|
|
type="text/css"?>
|
|
|
|
|
|
|
|
<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
|
|
|
|
|
2019-04-15 23:56:58 +03:00
|
|
|
<script src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
|
2011-08-18 17:22:52 +04:00
|
|
|
|
|
|
|
<body xmlns="http://www.w3.org/1999/xhtml">
|
|
|
|
<p id="display"></p>
|
|
|
|
<div id="content" style="display: none"/>
|
|
|
|
</body>
|
|
|
|
|
|
|
|
<script type="application/javascript">
|
2012-04-17 06:14:01 +04:00
|
|
|
function getLoadContext() {
|
2018-08-01 20:07:11 +03:00
|
|
|
return window.docShell.QueryInterface(Ci.nsILoadContext);
|
2012-04-17 06:14:01 +04:00
|
|
|
}
|
|
|
|
|
2020-10-26 20:37:26 +03:00
|
|
|
var transferable = Cc['@mozilla.org/widget/transferable;1']
|
|
|
|
.createInstance(Ci.nsITransferable);
|
2012-04-17 06:14:01 +04:00
|
|
|
transferable.init(getLoadContext());
|
2011-08-18 17:22:52 +04:00
|
|
|
|
|
|
|
transferable.addDataFlavor("text/unicode");
|
2021-02-01 15:05:12 +03:00
|
|
|
transferable.setTransferData("text/unicode", document);
|
2011-08-18 17:22:52 +04:00
|
|
|
|
2020-11-06 21:58:33 +03:00
|
|
|
Services.clipboard.setData(transferable, null, Ci.nsIClipboard.kGlobalClipboard);
|
2011-08-18 17:22:52 +04:00
|
|
|
|
2021-02-01 15:05:12 +03:00
|
|
|
transferable.setTransferData("text/unicode", null);
|
2016-03-04 19:54:10 +03:00
|
|
|
|
2011-08-18 17:22:52 +04:00
|
|
|
SimpleTest.ok(true, "Didn't crash setting non-text data for text/unicode type");
|
|
|
|
</script>
|
|
|
|
</window>
|