equal
deleted
inserted
replaced
39 var spy_callback = this.spy(); |
39 var spy_callback = this.spy(); |
40 widget._Popcorn.listen("timeupdate", spy_callback); |
40 widget._Popcorn.listen("timeupdate", spy_callback); |
41 IriSP.jQuery("#widget-div").children().click(); |
41 IriSP.jQuery("#widget-div").children().click(); |
42 ok(spy_callback.called, "handling function has been called"); |
42 ok(spy_callback.called, "handling function has been called"); |
43 }); |
43 }); |
|
44 |
|
45 test("test slider dragging", function() { |
|
46 |
|
47 /* comes from the jquery unit tests */ |
|
48 var drag = function(handle, dx, dy) { |
|
49 var element = el.data("draggable").element; |
|
50 $(handle).simulate("drag", { |
|
51 dx: dx || 0, |
|
52 dy: dy || 0 |
|
53 }); |
|
54 dragged = { dx: dx, dy: dy }; |
|
55 } |
|
56 |
|
57 var widget = new IriSP.SliderWidget(this.Popcorn, this.config, this.ser); |
|
58 widget.draw(); |
|
59 |
|
60 var spy_callback = this.spy(); |
|
61 widget._Popcorn.listen("timeupdate", spy_callback); |
|
62 |
|
63 IriSP.jQuery("#widget-div").children(".positionMarker").simulate("drag", 70, 50); |
|
64 ok(spy_callback.called, "handling function has been called"); |
|
65 }); |
44 } |
66 } |