Debian Codegraph @

dojox/mdnd/tests/unitTests/dropMode/FixtureLib.js

raw symbols SCIP
1 dojo.provide("dojox.mdnd.tests.unitTests.dropMode.FixtureLib");
2 dojo.require("dojox.mdnd.AreaManager");
3 dojo.declare("getDragPointFixture", null, {
4
5 constructor:function(testName, test) {
6 this.name = testName;
7 this.runTest = test;
8 },
9
10 setUp:function() {
11 this.coords = {'x':25,'y':50};
12 this.size = {'w':100,'h':100};
13 this.mousePosition = {'x':50, 'y':75};
14 this.dropMode = dojox.mdnd.AreaManager.areaManager()._dropMode;
15 },
16
17 tearDown:function() {
18 delete this.coords;
19 delete this.size;
20 delete this.dropMode;
21 }
22 });
23
24
25 dojo.declare("AreaFixture", null, {
26
27 constructor:function(testName, test) {
28 this.name = testName;
29 this.runTest = test;
30 },
31
32 setUp:function() {
33 this.dropMode = dojox.mdnd.AreaManager.areaManager()._dropMode;
34 this.array = [];
35
36 //fake area object
37 this.objectA = {'node': dojo.byId('areaA')};
38 this.objectB = {'node': dojo.byId('areaB')};
39 this.objectC = {'node': dojo.byId('areaC')};
40 this.objectD = {'node': dojo.byId('areaD')};
41 },
42
43 tearDown:function() {
44 delete this.dropMode;
45 delete this.array;
46 delete this.objectA;
47 delete this.objectB;
48 delete this.objectC;
49 delete this.objectD;
50 }
51 });
52
53 dojo.declare("ItemFixture", null, {
54
55 constructor:function(testName, test) {
56 this.name = testName;
57 this.runTest = test;
58 },
59
60 setUp:function() {
61 this.dropMode = dojox.mdnd.AreaManager.areaManager()._dropMode;
62 this.objet = {};
63 // fake moveable object
64 this.moveableA = {'node': dojo.byId("itemA")};
65 this.moveableB = {'node': dojo.byId("itemB")};
66 this.moveableC = {'node': dojo.byId("itemC")};
67 this.moveableD = {'node': dojo.byId("itemD")};
68 // fake item object
69 this.itemA = {'item': this.moveableA};
70 this.itemB = {'item': this.moveableB};
71 this.itemC = {'item': this.moveableC};
72 this.itemD = {'item': this.moveableD};
73 },
74
75 tearDown: function(){
76 delete this.dropMode;
77 delete this.array;
78 delete this.moveableA;
79 delete this.moveableB;
80 delete this.moveableC;
81 delete this.moveableD;
82 delete this.itemA;
83 delete this.itemB;
84 delete this.itemC;
85 delete this.itemD;
86 }
87 });