Index: trunk/phase3/tests/qunit/index.html |
— | — | @@ -33,8 +33,9 @@ |
34 | 34 | </script> |
35 | 35 | |
36 | 36 | <!-- MW: Non-default modules --> |
| 37 | + <script src="../../resources/jquery/jquery.autoEllipsis.js"></script> |
37 | 38 | <script src="../../resources/jquery/jquery.colorUtil.js"></script> |
38 | | - <script src="../../resources/jquery/jquery.autoEllipsis.js"></script> |
| 39 | + <script src="../../resources/jquery/jquery.tabIndex.js"></script> |
39 | 40 | |
40 | 41 | <!-- QUnit: Load framework --> |
41 | 42 | <link rel="stylesheet" href="../../resources/jquery/jquery.qunit.css" /> |
— | — | @@ -45,8 +46,8 @@ |
46 | 47 | <script src="suites/resources/mediawiki/mediawiki.user.js"></script> |
47 | 48 | <script src="suites/resources/jquery/jquery.mwPrototypes.js"></script> |
48 | 49 | <script src="suites/resources/mediawiki.util/mediawiki.util.js"></script> |
49 | | - <script src="suites/resources/jquery/jquery.colorUtil.js"></script> |
50 | 50 | <script src="suites/resources/jquery/jquery.autoEllipsis.js"></script> |
| 51 | + <script src="suites/resources/jquery/jquery.tabIndex.js"></script> |
51 | 52 | |
52 | 53 | <!-- TestSwarm: If a test swarm is running this, |
53 | 54 | the following script will allow it to extract the results. |
Index: trunk/phase3/tests/qunit/suites/resources/jquery/jquery.tabIndex.js |
— | — | @@ -0,0 +1,40 @@ |
| 2 | +module( 'jquery.tabIndex.js' ); |
| 3 | + |
| 4 | +test( '-- Initial check', function(){ |
| 5 | + |
| 6 | + ok( $.fn.firstTabIndex, '$.fn.firstTabIndex defined' ); |
| 7 | + ok( $.fn.lastTabIndex, '$.fn.lastTabIndex defined' ); |
| 8 | + |
| 9 | +}); |
| 10 | + |
| 11 | +test( 'firstTabIndex', function(){ |
| 12 | + |
| 13 | + var testEnvironment = |
| 14 | +'<form>\ |
| 15 | + <input tabindex="7" />\ |
| 16 | + <input tabindex="2" />\ |
| 17 | + <textarea tabindex="9">Foobar</textarea>\ |
| 18 | +</form>'; |
| 19 | + var $test = $( '<div />' ).html( testEnvironment ).appendTo( 'body' ); |
| 20 | + |
| 21 | + deepEqual( $test.firstTabIndex(), 2, 'First tabindex should be 2 within this context.' ); |
| 22 | + |
| 23 | + // Clean up |
| 24 | + $test.remove(); |
| 25 | +}); |
| 26 | + |
| 27 | +test( 'lastTabIndex', function(){ |
| 28 | + |
| 29 | + var testEnvironment = |
| 30 | +'<form>\ |
| 31 | + <input tabindex="7" />\ |
| 32 | + <input tabindex="2" />\ |
| 33 | + <textarea tabindex="9">Foobar</textarea>\ |
| 34 | +</form>'; |
| 35 | + var $test = $( '<div />' ).html( testEnvironment ).appendTo( 'body' ); |
| 36 | + |
| 37 | + deepEqual( $test.lastTabIndex(), 9, 'Last tabindex should be 9 within this context.' ); |
| 38 | + |
| 39 | + // Clean up |
| 40 | + $test.remove(); |
| 41 | +}); |
\ No newline at end of file |
Property changes on: trunk/phase3/tests/qunit/suites/resources/jquery/jquery.tabIndex.js |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 42 | + native |