]> source.dussan.org Git - jquery-ui.git/commitdiff
(no commit message)
authorPaul Bakaus <paul.bakaus@googlemail.com>
Fri, 23 May 2008 13:32:32 +0000 (13:32 +0000)
committerPaul Bakaus <paul.bakaus@googlemail.com>
Fri, 23 May 2008 13:32:32 +0000 (13:32 +0000)
ui/tests/draggable.html [new file with mode: 0644]
ui/tests/draggable.js [new file with mode: 0644]

diff --git a/ui/tests/draggable.html b/ui/tests/draggable.html
new file mode 100644 (file)
index 0000000..6292523
--- /dev/null
@@ -0,0 +1,29 @@
+<!DOCTYPE html>\r
+<html lang="en">\r
+<head>\r
+<meta http-equiv="Content-Language" content="en" />\r
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />\r
+<title>Draggable Test Page</title>\r
+<link rel="stylesheet" href="../../qunit/testsuite.css" type="text/css" media="screen">\r
+\r
+<script type="text/javascript" src="../../jquery/jquery-1.2.5.js"></script>\r
+<script type="text/javascript" src="../source/ui.core.js"></script>\r
+<script type="text/javascript" src="../source/ui.draggable.js"></script>\r
+\r
+<script type="text/javascript" src="../../qunit/testrunner.js"></script>\r
+<script type="text/javascript" src="draggable.js"></script>\r
+</head>\r
+<body>\r
+\r
+       <h1 id="header">jQuery Test Suite</h1>\r
+       <h2 id="banner"></h2>\r
+       <h2 id="userAgent"></h2>\r
+       \r
+       <div id="main" style="border: 1px solid black; padding: 10px; margin: 10px;">\r
+               <div id='draggable1' style="background: green; width: 200px; height: 100px;">I'm a draggable.</div>\r
+       </div>\r
+       \r
+       <ol id="tests"></ol>\r
+       \r
+</body>\r
+</html>\r
diff --git a/ui/tests/draggable.js b/ui/tests/draggable.js
new file mode 100644 (file)
index 0000000..f4b17b1
--- /dev/null
@@ -0,0 +1,19 @@
+$.fn.triggerKeydown = function(keyCode) {\r
+       return this.trigger("keydown", [$.event.fix({event:"keydown", keyCode: keyCode, target: this[0]})]);\r
+};\r
+\r
+\r
+$(document).ready(function() {\r
+\r
+       $("#draggable1").draggable();\r
+       \r
+       module("draggable: simple drag & drop");\r
+       \r
+       test("simple drag", function() {\r
+\r
+               expect(1);\r
+               ok(true, "Drag and drop element on the same position");\r
+               \r
+       });\r
+\r
+});
\ No newline at end of file