blob: 5438e2bd6208574ff2917abcbe9192d471d18b10 [file] [log] [blame]
<!doctype html>
<html>
<head>
<script src="../../resources/testharness.js"></script>
<script src="../../resources/testharnessreport.js"></script>
<script src="../../resources/WebIDLParser.js"></script>
<script src="../../resources/idlharness.js"></script>
</head>
<body>
<script id="datatransfer-idl" type="text/plain">
[Constructor, Exposed=(Window)]
interface DataTransfer {
attribute DOMString dropEffect;
attribute DOMString effectAllowed;
[SameObject] readonly attribute DataTransferItemList items;
void setDragImage(Element image, long x, long y);
/* old interface */
readonly attribute FrozenArray<DOMString> types;
DOMString getData(DOMString format);
void setData(DOMString format, DOMString data);
void clearData(optional DOMString format);
[SameObject] readonly attribute FileList files;
};
</script>
<script id="datatransferitemlist-idl" type="text/plain">
interface DataTransferItemList {
readonly attribute unsigned long length;
getter DataTransferItem (unsigned long index);
DataTransferItem? add(DOMString data, DOMString type);
DataTransferItem? add(File data);
void remove(unsigned long index);
void clear();
};
</script>
<script id="datatransferitem-idl" type="text/plain">
interface DataTransferItem {
readonly attribute DOMString kind;
readonly attribute DOMString type;
void getAsString(FunctionStringCallback? callback);
File? getAsFile();
};
callback FunctionStringCallback = void (DOMString data);
</script>
<script>
var idlsArray = new IdlArray();
var idl = document.getElementById("datatransfer-idl").textContent
+ document.getElementById("datatransferitemlist-idl").textContent
+ document.getElementById("datatransferitem-idl").textContent;
idlsArray.add_idls(idl);
idlsArray.add_untested_idls("interface Element {};");
idlsArray.test();
</script>
</body>
</html>