<!DOCTYPE html>
<script src="../../resources/js-test-pre.js"></script>
<div draggable="true" id="dragger">Drag me</div>
<script>

description('Tests correct behavior of event.dataTransfer.setData with wrong number of arguments');

var event;
var notEnoughArgumentsError = '"TypeError: Not enough arguments"';

var dragger = document.getElementById('dragger');
dragger.addEventListener('dragstart', function(e) {
    event = e;
    shouldThrow('event.dataTransfer.setData()', notEnoughArgumentsError);
    shouldThrow('event.dataTransfer.setData("Text")', notEnoughArgumentsError);
}, false);

if (window.eventSender) {
    var rect = dragger.getBoundingClientRect();
    var x = rect.left + rect.width / 2;
    var y = rect.top + rect.height / 2;
    eventSender.mouseMoveTo(x, y);
    eventSender.mouseDown();
    eventSender.leapForward(400);
    eventSender.mouseMoveTo(x + 100, y);
    eventSender.mouseUp();
}

</script>
<script src="../../resources/js-test-post.js"></script>
