Skip to content
Permalink
Browse files

Added some tests for name(), id() and title()

  • Loading branch information
jzaefferer committed Sep 17, 2006
1 parent c12bce2 commit 51a07a6a5f8b1e58fbbce6bcfe4d909a3f9ca964
Showing with 11 additions and 0 deletions.
  1. +11 −0 src/jquery/jquery.js
@@ -2673,6 +2673,10 @@ jQuery.macros = {
* @before <input type="text" id="test" value="some text"/>
* @result "test"
*
* @test ok( $(document.getElementById('main')).id() == "main", "Check for id" );
* @test ok( $("#foo").id() == "foo", "Check for id" );
* @test ok( !$("head").id(), "Check for id" );
*
* @name id
* @type String
* @cat DOM/Attributes
@@ -2699,6 +2703,9 @@ jQuery.macros = {
* @before <img src="test.jpg" title="my image"/>
* @result "my image"
*
* @test ok( $(document.getElementById('google')).title() == "Google!", "Check for title" );
* @test ok( !$("#yahoo").title(), "Check for title" );
*
* @name title
* @type String
* @cat DOM/Attributes
@@ -2725,6 +2732,10 @@ jQuery.macros = {
* @before <input type="text" name="username"/>
* @result "username"
*
* @test ok( $(document.getElementById('text1')).name() == "action", "Check for name" );
* @test ok( $("#hidden1").name() == "hidden", "Check for name" );
* @test ok( !$("#area1").name(), "Check for name" );
*
* @name name
* @type String
* @cat DOM/Attributes

0 comments on commit 51a07a6

Please sign in to comment.
You can’t perform that action at this time.