| [ Index ] |
PHP Cross Reference of Drupal 6 (gatewave) |
[Summary view] [Print] [Text view]
1 /* 2 * resizable_methods.js 3 */ 4 (function($) { 5 6 module("resizable: methods"); 7 8 test("init", function() { 9 expect(6); 10 11 $("<div></div>").appendTo('body').resizable().remove(); 12 ok(true, '.resizable() called on element'); 13 14 $([]).resizable().remove(); 15 ok(true, '.resizable() called on empty collection'); 16 17 $('<div></div>').resizable().remove(); 18 ok(true, '.resizable() called on disconnected DOMElement'); 19 20 $('<div></div>').resizable().resizable("foo").remove(); 21 ok(true, 'arbitrary method called after init'); 22 23 el = $('<div></div>').resizable() 24 var foo = el.data("foo.resizable"); 25 el.remove(); 26 ok(true, 'arbitrary option getter after init'); 27 28 $('<div></div>').resizable().data("foo.resizable", "bar").remove(); 29 ok(true, 'arbitrary option setter after init'); 30 }); 31 32 test("destroy", function() { 33 expect(6); 34 35 $("<div></div>").appendTo('body').resizable().resizable("destroy").remove(); 36 ok(true, '.resizable("destroy") called on element'); 37 38 $([]).resizable().resizable("destroy").remove(); 39 ok(true, '.resizable("destroy") called on empty collection'); 40 41 $('<div></div>').resizable().resizable("destroy").remove(); 42 ok(true, '.resizable("destroy") called on disconnected DOMElement'); 43 44 $('<div></div>').resizable().resizable("destroy").resizable("foo").remove(); 45 ok(true, 'arbitrary method called after destroy'); 46 47 el = $('<div></div>').resizable(); 48 var foo = el.resizable("destroy").data("foo.resizable"); 49 el.remove(); 50 ok(true, 'arbitrary option getter after destroy'); 51 52 $('<div></div>').resizable().resizable("destroy").data("foo.resizable", "bar").remove(); 53 ok(true, 'arbitrary option setter after destroy'); 54 }); 55 56 test("enable", function() { 57 ok(false, "missing test - untested code is broken code."); 58 }); 59 60 test("disable", function() { 61 ok(false, "missing test - untested code is broken code."); 62 }); 63 64 })(jQuery);
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
| Generated: Thu Mar 24 11:18:33 2011 | Cross-referenced by PHPXref 0.7 |