Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / events / drag-and-drop-set-drag-data-arguments.html
blob12ec7e90044b9671cff7e25ac518d55eaa6cb79b
1 <!DOCTYPE html>
2 <script src="../../resources/js-test.js"></script>
3 <div draggable="true" id="dragger">Drag me</div>
4 <script>
6 description('Tests correct behavior of event.dataTransfer.setData with wrong number of arguments');
8 var event;
10 var dragger = document.getElementById('dragger');
11 dragger.addEventListener('dragstart', function(e) {
12 event = e;
13 shouldThrow('event.dataTransfer.setData()', '"TypeError: Failed to execute \'setData\' on \'DataTransfer\': 2 arguments required, but only 0 present."');
14 shouldThrow('event.dataTransfer.setData("Text")', '"TypeError: Failed to execute \'setData\' on \'DataTransfer\': 2 arguments required, but only 1 present."');
15 }, false);
17 if (window.eventSender) {
18 var rect = dragger.getBoundingClientRect();
19 var x = rect.left + rect.width / 2;
20 var y = rect.top + rect.height / 2;
21 eventSender.mouseMoveTo(x, y);
22 eventSender.mouseDown();
23 eventSender.leapForward(400);
24 eventSender.mouseMoveTo(x + 100, y);
25 eventSender.mouseUp();
28 </script>