Skip to content

Commit

Permalink
add tests
Browse files Browse the repository at this point in the history
  • Loading branch information
client9 committed Apr 23, 2010
1 parent 27318d4 commit 5af9a67
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion specs/parser/spec.js
Expand Up @@ -360,7 +360,7 @@ test('Link Loading', function(){
});

test('Form Named Element Lookup', function(){
expect(8);
expect(10);
if ((typeof Envjs == 'undefined') || !Envjs) {
Envjs = {};
}
Expand All @@ -387,6 +387,12 @@ test('Form Named Element Lookup', function(){
ok(elements.input1 instanceof HTMLInputElement, 'is HTMLInputElement');
ok(form.input1 instanceof HTMLInputElement, 'is HTMLInputElement');

// let's change the name
var node = form.input1;
node.name = 'input2';
ok(elements.input1 instanceof HTMLInputElement, 'is HTMLInputElement');
ok(form.input1 instanceof HTMLInputElement, 'is HTMLInputElement');

/*
// the other one should be zapped
node2 = doc.foo;
Expand Down

0 comments on commit 5af9a67

Please sign in to comment.