Source code
Revision control
Copy as Markdown
Other Tools
Test Info: Warnings
- This test gets skipped with pattern: os == 'android'
- Manifest: widget/tests/chrome.toml
<?xml version="1.0"?>
type="text/css"?>
<p id="display"></p>
<div id="content" style="display: none"/>
</body>
<script type="application/javascript">
function getLoadContext() {
return window.docShell.QueryInterface(Ci.nsILoadContext);
}
var transferable = Cc['@mozilla.org/widget/transferable;1']
.createInstance(Ci.nsITransferable);
transferable.init(getLoadContext());
transferable.addDataFlavor("text/plain");
transferable.setTransferData("text/plain", document);
Services.clipboard.setData(transferable, null, Ci.nsIClipboard.kGlobalClipboard);
transferable.setTransferData("text/plain", null);
SimpleTest.ok(true, "Didn't crash setting non-text data for text/plain type");
</script>
</window>