Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

initial test for preComputing

  • Loading branch information...
commit 8ad626e3991434dd2cefc50688e1ec805f467df3 1 parent 4a487cc
@RStankov RStankov authored
Showing with 11 additions and 1 deletion.
  1. +11 −1 test/unit/layout_test.js
View
12 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();
Please sign in to comment.
Something went wrong with that request. Please try again.