Permalink
Browse files

initial test for preComputing

  • Loading branch information...
1 parent 4a487cc commit 8ad626e3991434dd2cefc50688e1ec805f467df3 @RStankov RStankov committed Feb 17, 2010
Showing with 11 additions and 1 deletion.
  1. +11 −1 test/unit/layout_test.js
@@ -14,7 +14,17 @@ function isDisplayed(element) {
new Test.Unit.Runner({
setup: function() {
},
-
+ 'test preCompute argument of layout': function() {
+ var preComputedLayout = $('box1').getLayout(true),
+ normalLayout = $('box1').getLayout();
+
+ // restore normal get method from Hash object
+ preComputedLayout.get = Hash.prototype.get;
+
+ Element.Layout.PROPERTIES.each(function(key) {
+ this.assertEqual(normalLayout.get(key), preComputedLayout.get(key), key);
+ }, this);
+ },
'test layout on absolutely-positioned elements': function() {
var layout = $('box1').getLayout();

0 comments on commit 8ad626e

Please sign in to comment.