From ac451d6d8fe9dfaa20066984e7c39c1dbcaa4c35 Mon Sep 17 00:00:00 2001 From: Andrew Dupont Date: Mon, 2 Nov 2009 23:52:19 -0600 Subject: [PATCH] Tweaks to unit tests. --- test/unit/layout_test.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/test/unit/layout_test.js b/test/unit/layout_test.js index 5b05792..eec7187 100644 --- a/test/unit/layout_test.js +++ b/test/unit/layout_test.js @@ -57,7 +57,6 @@ new Test.Unit.Runner({ 'test layout on elements with display: none ancestors': function() { var layout = $('box4').getLayout(); - // Ensure that we cleaned up after ourselves. this.assert(!isDisplayed($('box4')), 'box should be hidden'); // Width and height values are nonsensical for deeply-hidden elements. @@ -67,6 +66,9 @@ new Test.Unit.Runner({ // But we can still get meaningful values for other measurements. this.assertEqual(0, layout.get('border-right'), 'border-top'); this.assertEqual(13, layout.get('padding-bottom'), 'padding-right'); + + // Ensure that we cleaned up after ourselves. + this.assert(!isDisplayed($('box3')), 'box should still be hidden'); }, 'test positioning on absolutely-positioned elements': function() { @@ -75,6 +77,6 @@ new Test.Unit.Runner({ this.assertEqual(30, layout.get('top'), 'top'); this.assertEqual(60, layout.get('right'), 'right (percentage value)'); - this.assertNull(layout.get('left'), 'left (should be null because none was set)'); + this.assertEqual(340, layout.get('left'), 'left'); } }); \ No newline at end of file