Skip to content
Permalink
Browse files

Fix typos. Close gh-1186.

  • Loading branch information...
dmitrygusev authored and dmethvin committed Feb 27, 2013
1 parent eebc778 commit eee2eaf1d7a189d99106423a4206c224ebd5b848
@@ -162,3 +162,4 @@ Jean Boussier <jean.boussier@gmail.com>
Adam Coulombe <me@adam.co>
Andrew Plummer <plummer.andrew@gmail.com>
Nguyen Phuc Lam <ruado1987@gmail.com>
Dmitry Gusev <dmitry.gusev@gmail.com>

Large diffs are not rendered by default.

@@ -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;
@@ -44,7 +44,7 @@ <h1>
#8135
</a>
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.
</div>
<div>Take the following steps:</div>
<ol>
@@ -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" );
}
}
]);
@@ -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("<div value='t'></div>").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("<details open></details>").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 );
@@ -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" );
@@ -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( "<div>" ).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();
@@ -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;

@@ -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("<div>test<br/>testy</div>").appendTo("#moretests");
$newLineTest.find("br").replaceWith("\n");
@@ -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" );
});

0 comments on commit eee2eaf

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