| author | hamidouk |
| Tue, 25 Oct 2011 14:33:31 +0200 | |
| branch | popcorn-port |
| changeset 142 | caefb8b4218f |
| parent 124 | 2758dfb208b2 |
| child 170 | 5150ae56e0a6 |
| permissions | -rw-r--r-- |
| 74 | 1 |
/* test module for base widgets */ |
2 |
function test_widget() { |
|
3 |
module("Base widget testing", |
|
4 |
{setup : function() { |
|
5 |
this.Popcorn = Popcorn.youtube("#popcorn-div", "http://www.youtube.com/watch?v=QH2-TGUlwu4"); |
|
6 |
|
|
7 |
this.dt = new IriSP.DataLoader(); |
|
8 |
this.ser = new IriSP.JSONSerializer(this.dt, "/url"); |
|
9 |
} } |
|
10 |
); |
|
11 |
|
|
12 |
test("test initialisation", function() { |
|
|
124
2758dfb208b2
changed widget.js to add some properties to the widget. Widgets now only get the
hamidouk
parents:
119
diff
changeset
|
13 |
var config = { container: "mydiv", width: 640, height: 480}; |
| 114 | 14 |
var wid = new IriSP.Widget(this.Popcorn, config, this.ser); |
15 |
deepEqual(wid._config, config, "Check if the parent div is set correctly"); |
|
16 |
ok(wid.selector, "Check if the jquery selector is set"); |
|
| 74 | 17 |
|
18 |
}); |
|
19 |
|
|
20 |
|
|
21 |
}; |