unittests/tests/layout.js
changeset 944 8a6c9e3d0158
parent 907 27b248a13355
parent 943 a882cc0c936f
child 945 7d9f6fd6f904
--- a/unittests/tests/layout.js	Thu May 24 15:05:47 2012 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,40 +0,0 @@
-/* tests for layout.js */
-function test_layout() {
-  module("layout manager", {setup: 
-    function() { 
-    IriSP.jQuery("#widget-div").append("<div id='LdtPlayer'></div>"); 
-    IriSP.jQuery("#widget-div").append("<div id='myDiv'></div>"); 
-    }});
-  
-  test("test the default initialization of layout manager", function() {
-      var lay = new IriSP.LayoutManager();
-      equal(lay._div, "LdtPlayer", "the default div is set correctly");
-      equal(lay._width, 640, "the default width is set correctly");
-      equal(lay._height, undefined, "the default height is set correctly");
-      
-      equal(IriSP.jQuery("#" + lay._div).css("width"), lay._width + "px", "div width is set correctly");      
-  });
-  
-  test("test custom init of layout manager", function() {
-    var lay = new IriSP.LayoutManager({container: "myDiv", width: 327, height: 542});
-    equal(lay._div, "myDiv", "the default div is set correctly");
-    equal(lay._width, 327, "the default width is set correctly");
-    equal(lay._height, 542, "the default height is set correctly");
-    
-    equal(IriSP.jQuery("#" + lay._div).css("width"), lay._width + "px", "div width is set correctly");
-    equal(IriSP.jQuery("#" + lay._div).css("height"), lay._height + "px", "div height is set correctly");
-  });
-  
-  test("test widget div creation", function() {
-    var lay = new IriSP.LayoutManager({});
-    var ret = lay.createDiv(); 
-    var divId = ret[0];
-    var spacerId = ret[1];
-    
-    equal(lay.selector.children("#" + divId).length, 1, "check that a subdiv container is created");
-    equal(lay.selector.children("#" + spacerId).length, 1, "check that a spacer subdiv is created");
-    equal(lay.selector.children("#" + spacerId).height() + "px", IriSP.widgetsDefaults.LayoutManager.spacer_div_height, "check that spacer height is set");
-    
-  });
-  
-};