8 |
8 |
9 test("test the default initialization of layout manager", function() { |
9 test("test the default initialization of layout manager", function() { |
10 var lay = new IriSP.LayoutManager(); |
10 var lay = new IriSP.LayoutManager(); |
11 equal(lay._div, "LdtPlayer", "the default div is set correctly"); |
11 equal(lay._div, "LdtPlayer", "the default div is set correctly"); |
12 equal(lay._width, 640, "the default width is set correctly"); |
12 equal(lay._width, 640, "the default width is set correctly"); |
13 equal(lay._height, 480, "the default height is set correctly"); |
13 equal(lay._height, undefined, "the default height is set correctly"); |
14 |
14 |
15 equal(IriSP.jQuery("#" + lay._div).css("width"), lay._width + "px", "div width is set correctly"); |
15 equal(IriSP.jQuery("#" + lay._div).css("width"), lay._width + "px", "div width is set correctly"); |
16 equal(IriSP.jQuery("#" + lay._div).css("height"), lay._height + "px", "div height is set correctly"); |
|
17 }); |
16 }); |
18 |
17 |
19 test("test custom init of layout manager", function() { |
18 test("test custom init of layout manager", function() { |
20 var lay = new IriSP.LayoutManager({container: "myDiv", width: 327, height: 542}); |
19 var lay = new IriSP.LayoutManager({container: "myDiv", width: 327, height: 542}); |
21 equal(lay._div, "myDiv", "the default div is set correctly"); |
20 equal(lay._div, "myDiv", "the default div is set correctly"); |