X-Git-Url: http://git.asbjorn.it/?a=blobdiff_plain;f=src%2Fjquery%2FcoreTest.js;h=43b9e81016ec8f007f053af0bb83e96b78c7345f;hb=af329ed00b0499a8d393f132d2765d02144f6820;hp=05fd026d7ab3fe89c7ebb4f1c2f8b0f43131377f;hpb=cb828f3dab6ec8439ac111246346a8d4b3205fed;p=jquery.git
diff --git a/src/jquery/coreTest.js b/src/jquery/coreTest.js
index 05fd026..43b9e81 100644
--- a/src/jquery/coreTest.js
+++ b/src/jquery/coreTest.js
@@ -225,7 +225,7 @@ test("attr(Hash)", function() {
});
test("attr(String, Object)", function() {
- expect(7);
+ expect(8);
var div = $("div");
div.attr("foo", "bar");
var pass = true;
@@ -246,6 +246,8 @@ test("attr(String, Object)", function() {
ok( document.getElementById('text1').readOnly == true, 'Set readonly attribute' );
$("#text1").attr('readonly', false);
ok( document.getElementById('text1').readOnly == false, 'Set readonly attribute' );
+ $("#name").attr('maxlength', '5');
+ ok( document.getElementById('name').maxLength == '5', 'Set maxlength attribute' );
});
if ( location.protocol != "file:" ) {
@@ -356,14 +358,14 @@ test("wrap(String|Element)", function() {
});
test("append(String|Element|Array<Element>|jQuery)", function() {
- expect(13);
+ expect(17);
var defaultText = 'Try them out:'
var result = $('#first').append('buga');
ok( result.text() == defaultText + 'buga', 'Check if text appending works' );
ok( $('#select3').append('').find('option:last-child').attr('value') == 'appendTest', 'Appending html options to select element');
reset();
- expected = "This link has class=\"blog\": Simon Willison's WeblogTry them out:";
+ var expected = "This link has class=\"blog\": Simon Willison's WeblogTry them out:";
$('#sap').append(document.getElementById('first'));
ok( expected == $('#sap').text(), "Check for appending of element" );
@@ -405,20 +407,36 @@ test("append(String|Element|Array<Element>|jQuery)", function() {
ok( pass, "Test for appending a DOM node to the contents of an IFrame" );
reset();
- $('#select1').appendTo('#foo');
- t( 'Append select', '#foo select', ['select1'] );
+ $('