From eee2eaf1d7a189d99106423a4206c224ebd5b848 Mon Sep 17 00:00:00 2001 From: dmitrygusev Date: Thu, 28 Feb 2013 00:44:34 +0400 Subject: [PATCH] Fix typos. Close gh-1186. --- AUTHORS.txt | 1 + speed/index.html | 2 +- speed/jquery-basis.js | 2 +- test/networkerror.html | 2 +- test/unit/ajax.js | 6 +++--- test/unit/attributes.js | 4 ++-- test/unit/core.js | 8 ++++---- test/unit/dimensions.js | 8 ++++---- test/unit/event.js | 6 +++--- test/unit/manipulation.js | 4 ++-- test/unit/traversing.js | 16 ++++++++-------- 11 files changed, 30 insertions(+), 29 deletions(-) diff --git a/AUTHORS.txt b/AUTHORS.txt index bf0db66da..a62455fe6 100644 --- a/AUTHORS.txt +++ b/AUTHORS.txt @@ -162,3 +162,4 @@ Jean Boussier Adam Coulombe Andrew Plummer Nguyen Phuc Lam +Dmitry Gusev diff --git a/speed/index.html b/speed/index.html index d5810a2d1..74c67bc39 100644 --- a/speed/index.html +++ b/speed/index.html @@ -62,7 +62,7 @@ -
+
diff --git a/speed/jquery-basis.js b/speed/jquery-basis.js index f5cb04ce3..9335cc0bb 100644 --- a/speed/jquery-basis.js +++ b/speed/jquery-basis.js @@ -788,7 +788,7 @@ function evalScript( i, elem ) { } } -// Mutifunctional method to get and set values to a collection +// Multifunctional method to get and set values to a collection // The value/s can be optionally by executed if its a function function access( elems, key, value, exec, fn, pass ) { var length = elems.length; diff --git a/test/networkerror.html b/test/networkerror.html index 99b4ded51..edbaabab4 100644 --- a/test/networkerror.html +++ b/test/networkerror.html @@ -44,7 +44,7 @@ #8135 which was reported in Firefox when accessing properties - of an XMLHttpRequest object after a network error occured. + of an XMLHttpRequest object after a network error occurred.
Take the following steps:
    diff --git a/test/unit/ajax.js b/test/unit/ajax.js index e2335e507..040485098 100644 --- a/test/unit/ajax.js +++ b/test/unit/ajax.js @@ -440,7 +440,7 @@ module( "ajax", { url: url("data/name.html"), context: {}, success: function() { - ok( this !== obj, "Make sure overidding context is possible." ); + ok( this !== obj, "Make sure overriding context is possible." ); } }] }; @@ -1194,14 +1194,14 @@ module( "ajax", { xhr.overrideMimeType( "application/json" ); }, success: function( json ) { - ok( json.data, "Mimetype overriden using beforeSend" ); + ok( json.data, "Mimetype overridden using beforeSend" ); } }, { url: url("data/json.php"), mimeType: "application/json", success: function( json ) { - ok( json.data, "Mimetype overriden using mimeType option" ); + ok( json.data, "Mimetype overridden using mimeType option" ); } } ]); diff --git a/test/unit/attributes.js b/test/unit/attributes.js index 67ef17472..aa232e887 100644 --- a/test/unit/attributes.js +++ b/test/unit/attributes.js @@ -66,7 +66,7 @@ test( "attr(String)", function() { equal( jQuery("#text1").attr("value", "t").attr("value"), "t", "Check setting the value attribute" ); equal( jQuery("#text1").attr("value", "").attr("value"), "", "Check setting the value attribute to empty string" ); equal( jQuery("
    ").attr("value"), "t", "Check setting custom attr named 'value' on a div" ); - equal( jQuery("#form").attr("blah", "blah").attr("blah"), "blah", "Set non-existant attribute on a form" ); + equal( jQuery("#form").attr("blah", "blah").attr("blah"), "blah", "Set non-existent attribute on a form" ); equal( jQuery("#foo").attr("height"), undefined, "Non existent height attribute should return undefined" ); // [7472] & [3113] (form contains an input with name="action" or name="id") @@ -339,7 +339,7 @@ test( "attr(String, Object)", function() { equal( $text.attr( "required", false ).attr("required"), undefined, "Setting required attribute to false removes it" ); var $details = jQuery("
    ").appendTo("#qunit-fixture"); - equal( $details.attr("open"), "open", "open attribute presense indicates true" ); + equal( $details.attr("open"), "open", "open attribute presence indicates true" ); equal( $details.attr( "open", false ).attr("open"), undefined, "Setting open attribute to false removes it" ); $text.attr( "data-something", true ); diff --git a/test/unit/core.js b/test/unit/core.js index 0a9227afb..7c840993b 100644 --- a/test/unit/core.js +++ b/test/unit/core.js @@ -945,8 +945,8 @@ test("jQuery.extend(Object, Object)", function() { ok( jQuery.extend(true, {}, nestedarray)["arr"] !== arr, "Deep extend of object must clone child array" ); // #5991 - ok( jQuery.isArray( jQuery.extend(true, { "arr": {} }, nestedarray)["arr"] ), "Cloned array heve to be an Array" ); - ok( jQuery.isPlainObject( jQuery.extend(true, { "arr": arr }, { "arr": {} })["arr"] ), "Cloned object heve to be an plain object" ); + ok( jQuery.isArray( jQuery.extend(true, { "arr": {} }, nestedarray)["arr"] ), "Cloned array have to be an Array" ); + ok( jQuery.isPlainObject( jQuery.extend(true, { "arr": arr }, { "arr": {} })["arr"] ), "Cloned object have to be an plain object" ); var empty = {}; var optionsWithLength = { "foo": { "length": -1 } }; @@ -992,10 +992,10 @@ test("jQuery.extend(Object, Object)", function() { deepEqual( target, { bar:5 }, "Check to make sure a recursive obj doesn't go never-ending loop by not copying it over" ); ret = jQuery.extend(true, { foo: [] }, { foo: [0] } ); // 1907 - equal( ret.foo.length, 1, "Check to make sure a value with coersion 'false' copies over when necessary to fix #1907" ); + equal( ret.foo.length, 1, "Check to make sure a value with coercion 'false' copies over when necessary to fix #1907" ); ret = jQuery.extend(true, { foo: "1,2,3" }, { foo: [1, 2, 3] } ); - ok( typeof ret.foo != "string", "Check to make sure values equal with coersion (but not actually equal) overwrite correctly" ); + ok( typeof ret.foo != "string", "Check to make sure values equal with coercion (but not actually equal) overwrite correctly" ); ret = jQuery.extend(true, { foo:"bar" }, { foo:null } ); ok( typeof ret.foo !== "undefined", "Make sure a null value doesn't crash with deep extend, for #1908" ); diff --git a/test/unit/dimensions.js b/test/unit/dimensions.js index 64094c2e5..bcb7b7f2c 100644 --- a/test/unit/dimensions.js +++ b/test/unit/dimensions.js @@ -68,7 +68,7 @@ test("width(Function(args))", function() { var $div = jQuery("#nothiddendiv"); $div.width( 30 ).width(function(i, width) { - equal( width, 30, "Make sure previous value is corrrect." ); + equal( width, 30, "Make sure previous value is correct." ); return width + 1; }); @@ -119,7 +119,7 @@ test("height(Function(args))", function() { var $div = jQuery("#nothiddendiv"); $div.height( 30 ).height(function(i, height) { - equal( height, 30, "Make sure previous value is corrrect." ); + equal( height, 30, "Make sure previous value is correct." ); return height + 1; }); @@ -271,7 +271,7 @@ test("child of a hidden elem (or unconnected node) has accurate inner/outer/Widt $divNormal.remove(); }); -test("getting dimensions shouldnt modify runtimeStyle see #9233", function() { +test("getting dimensions shouldn't modify runtimeStyle see #9233", function() { expect( 1 ); var $div = jQuery( "
    " ).appendTo( "#qunit-fixture" ), @@ -288,7 +288,7 @@ test("getting dimensions shouldnt modify runtimeStyle see #9233", function() { if ( runtimeStyle ) { equal( div.runtimeStyle.left, "11em", "getting dimensions modifies runtimeStyle, see #9233" ); } else { - ok( true, "this browser doesnt support runtimeStyle, see #9233" ); + ok( true, "this browser doesn't support runtimeStyle, see #9233" ); } $div.remove(); diff --git a/test/unit/event.js b/test/unit/event.js index e2aa6f93c..670fa9111 100644 --- a/test/unit/event.js +++ b/test/unit/event.js @@ -1001,7 +1001,7 @@ test("trigger(type, [data], [fn])", function() { jQuery( document ).off( "mouseenter mouseleave", "#firstp"); - // Triggers handlrs and native + // Triggers handlers and native // Trigger 5 $elem.bind("click", handler).trigger("click", [1, "2", "abc"]); @@ -1515,7 +1515,7 @@ test(".delegate()/.undelegate()", function() { equal( livea, 1, "undelegate Click on inner div" ); equal( liveb, 0, "undelegate Click on inner div" ); - // Make sure that stopPropgation doesn't stop live events + // Make sure that stopPropagation doesn't stop live events submit = 0; div = 0; livea = 0; liveb = 0; jQuery("#body").delegate("div#nothiddendivchild", "click", function(e){ liveb++; e.stopPropagation(); }); jQuery("div#nothiddendivchild").trigger("click"); @@ -1646,7 +1646,7 @@ test(".delegate()/.undelegate()", function() { // Cleanup jQuery("#body").undelegate("#nothiddendivchild", "click"); - // Verify that .live() ocurs and cancel buble in the same order as + // Verify that .live() occurs and cancel bubble in the same order as // we would expect .bind() and .click() without delegation var lived = 0, livee = 0; diff --git a/test/unit/manipulation.js b/test/unit/manipulation.js index 20d017b25..2f882bf82 100644 --- a/test/unit/manipulation.js +++ b/test/unit/manipulation.js @@ -39,14 +39,14 @@ test( "text()", function() { equal( jQuery("#sap").text(), expected, "Check for merged text of more then one element." ); // Check serialization of text values - equal( jQuery(document.createTextNode("foo")).text(), "foo", "Text node was retreived from .text()." ); + equal( jQuery(document.createTextNode("foo")).text(), "foo", "Text node was retrieved from .text()." ); notEqual( jQuery(document).text(), "", "Retrieving text for the document retrieves all text (#10724)." ); // Retrieve from document fragments #10864 frag = document.createDocumentFragment(); frag.appendChild( document.createTextNode("foo") ); - equal( jQuery(frag).text(), "foo", "Document Fragment Text node was retreived from .text()." ); + equal( jQuery(frag).text(), "foo", "Document Fragment Text node was retrieved from .text()." ); $newLineTest = jQuery("
    test
    testy
    ").appendTo("#moretests"); $newLineTest.find("br").replaceWith("\n"); diff --git a/test/unit/traversing.js b/test/unit/traversing.js index 9d8c0d20d..0e6439300 100644 --- a/test/unit/traversing.js +++ b/test/unit/traversing.js @@ -71,11 +71,11 @@ test("is(String|undefined)", function() { ok( !jQuery("#foo").is(undefined), "Expected false for an invalid expression - undefined" ); ok( !jQuery("#foo").is({ plain: "object" }), "Check passing invalid object" ); - // test is() with comma-seperated expressions - ok( jQuery("#en").is("[lang=\"en\"],[lang=\"de\"]"), "Comma-seperated; Check for lang attribute: Expect en or de" ); - ok( jQuery("#en").is("[lang=\"de\"],[lang=\"en\"]"), "Comma-seperated; Check for lang attribute: Expect en or de" ); - ok( jQuery("#en").is("[lang=\"en\"] , [lang=\"de\"]"), "Comma-seperated; Check for lang attribute: Expect en or de" ); - ok( jQuery("#en").is("[lang=\"de\"] , [lang=\"en\"]"), "Comma-seperated; Check for lang attribute: Expect en or de" ); + // test is() with comma-separated expressions + ok( jQuery("#en").is("[lang=\"en\"],[lang=\"de\"]"), "Comma-separated; Check for lang attribute: Expect en or de" ); + ok( jQuery("#en").is("[lang=\"de\"],[lang=\"en\"]"), "Comma-separated; Check for lang attribute: Expect en or de" ); + ok( jQuery("#en").is("[lang=\"en\"] , [lang=\"de\"]"), "Comma-separated; Check for lang attribute: Expect en or de" ); + ok( jQuery("#en").is("[lang=\"de\"] , [lang=\"en\"]"), "Comma-separated; Check for lang attribute: Expect en or de" ); }); test("is() against window|document (#10178)", function() { @@ -606,9 +606,9 @@ test("prevUntil([String])", function() { test("contents()", function() { expect(12); equal( jQuery("#ap").contents().length, 9, "Check element contents" ); - ok( jQuery("#iframe").contents()[0], "Check existance of IFrame document" ); + ok( jQuery("#iframe").contents()[0], "Check existence of IFrame document" ); var ibody = jQuery("#loadediframe").contents()[0].body; - ok( ibody, "Check existance of IFrame body" ); + ok( ibody, "Check existence of IFrame body" ); equal( jQuery("span", ibody).text(), "span text", "Find span in IFrame and check its text" ); @@ -714,5 +714,5 @@ test("index(no arg) #10977", function() { var fragment = document.createDocumentFragment(), div = fragment.appendChild( document.createElement("div") ); - equal( jQuery( div ).index(), 0, "If jQuery#index called on element whos parent is fragment, it still should work correctly" ); + equal( jQuery( div ).index(), 0, "If jQuery#index called on element whose parent is fragment, it still should work correctly" ); }); -- 2.39.5