Permalink
Browse files

First pass on MASSIVE rewrite of dom.js. Some methods are missing, du…

…e to be moved to layout.js; therefore some tests fail.
  • Loading branch information...
1 parent 1fb9728 commit 09aff1ea6dd6593f8c0f0ec942a259dad8d1bced @savetheclocktower savetheclocktower committed Nov 30, 2010
Showing with 1,707 additions and 1,997 deletions.
  1. +1,696 −1,992 src/dom/dom.js
  2. +11 −5 test/unit/dom_test.js
View
3,688 src/dom/dom.js
1,696 additions, 1,992 deletions not shown because the diff is too large. Please use a local Git client to view these changes.
View
16 test/unit/dom_test.js
@@ -278,13 +278,13 @@ new Test.Unit.Runner({
testElementToggle: function(){
$('test-toggle-visible').toggle();
- this.assert(!$('test-toggle-visible').visible());
+ this.assert(!$('test-toggle-visible').visible(), 'test-toggle-visible 1');
$('test-toggle-visible').toggle();
- this.assert($('test-toggle-visible').visible());
+ this.assert($('test-toggle-visible').visible()), 'test-toggle-visible 2';
$('test-toggle-hidden').toggle();
- this.assert($('test-toggle-hidden').visible());
+ this.assert($('test-toggle-hidden').visible(), 'test-toggle-hidden 1');
$('test-toggle-hidden').toggle();
- this.assert(!$('test-toggle-hidden').visible());
+ this.assert(!$('test-toggle-hidden').visible(), 'test-toggle-hidden 2');
},
testElementShow: function(){
@@ -1501,8 +1501,14 @@ new Test.Unit.Runner({
this.assertEqual("default", element.retrieve('bar', 'default'), "Return default value if undefined key");
this.assertEqual("default", element.retrieve('bar'), "Makes sure default value has been set properly");
+
+ $('test-empty').store('foo', 'bar');
var clonedElement = $('test-empty').clone(false);
- this.assert(Object.isUndefined(clonedElement._prototypeUID), "Cloning a node should not confuse the storage engine");
+ this.assertEqual(
+ clonedElement.retrieve('foo', null),
+ null,
+ "Cloning a node should not confuse the storage engine"
+ );
},
testElementClone: function() {

0 comments on commit 09aff1e

Please sign in to comment.