aboutsummaryrefslogtreecommitdiffstats
path: root/test/unit/manipulation.js
diff options
context:
space:
mode:
authorJohn Resig <jeresig@gmail.com>2010-08-26 14:57:23 -0400
committerJohn Resig <jeresig@gmail.com>2010-08-26 14:57:23 -0400
commitc0fe98f0281ea818ddf6a458d98b5aa3e2060701 (patch)
tree250a814d8d33b622010919a0db4b0aafcf8e00d5 /test/unit/manipulation.js
parent3b76b588153e93c57679fd7ca287eb863994dd59 (diff)
downloadjquery-c0fe98f0281ea818ddf6a458d98b5aa3e2060701.tar.gz
jquery-c0fe98f0281ea818ddf6a458d98b5aa3e2060701.zip
Tweak more element orders in the manipulation tests. Also differentiate between iframe test failing and the inability to access iframe internals (as in the case of Blackberry).
Diffstat (limited to 'test/unit/manipulation.js')
-rw-r--r--test/unit/manipulation.js18
1 files changed, 10 insertions, 8 deletions
diff --git a/test/unit/manipulation.js b/test/unit/manipulation.js
index fdc391a54..1a093e200 100644
--- a/test/unit/manipulation.js
+++ b/test/unit/manipulation.js
@@ -262,10 +262,12 @@ var testAppend = function(valueObj) {
QUnit.reset();
var pass = true;
try {
- jQuery( jQuery("#iframe")[0].contentWindow.document.body ).append(valueObj( "<div>test</div>" ));
- } catch(e) {
+ var body = jQuery("#iframe")[0].contentWindow.document.body;
+
pass = false;
- }
+ jQuery( document.body ).append(valueObj( "<div>test</div>" ));
+ pass = true;
+ } catch(e) {}
ok( pass, "Test for appending a DOM node to the contents of an IFrame" );
@@ -359,7 +361,7 @@ test("append(Function) with incoming value", function() {
jQuery('#sap').append(function(i, val){
equals( val, old, "Make sure the incoming value is correct." );
- return jQuery("#first, #yahoo");
+ return jQuery("#yahoo, #first");
});
equals( expected, jQuery('#sap').text(), "Check for appending of jQuery object" );
@@ -407,7 +409,7 @@ test("appendTo(String|Element|Array&lt;Element&gt;|jQuery)", function() {
QUnit.reset();
expected = "This link has class=\"blog\": Simon Willison's WeblogYahooTry them out:";
- jQuery("#first, #yahoo").appendTo('#sap');
+ jQuery("#yahoo, #first").appendTo('#sap');
equals( expected, jQuery('#sap').text(), "Check for appending of jQuery object" );
QUnit.reset();
@@ -469,7 +471,7 @@ var testPrepend = function(val) {
QUnit.reset();
expected = "YahooTry them out:This link has class=\"blog\": Simon Willison's Weblog";
- jQuery('#sap').prepend(val( jQuery("#first, #yahoo") ));
+ jQuery('#sap').prepend(val( jQuery("#yahoo, #first") ));
equals( expected, jQuery('#sap').text(), "Check for prepending of jQuery object" );
};
@@ -526,7 +528,7 @@ test("prepend(Function) with incoming value", function() {
jQuery('#sap').prepend(function(i, val) {
equals( val, old, "Make sure the incoming value is correct." );
- return jQuery("#first, #yahoo");
+ return jQuery("#yahoo, #first");
});
equals( expected, jQuery('#sap').text(), "Check for prepending of jQuery object" );
@@ -551,7 +553,7 @@ test("prependTo(String|Element|Array&lt;Element&gt;|jQuery)", function() {
QUnit.reset();
expected = "YahooTry them out:This link has class=\"blog\": Simon Willison's Weblog";
- jQuery("#first, #yahoo").prependTo('#sap');
+ jQuery("#yahoo, #first").prependTo('#sap');
equals( expected, jQuery('#sap').text(), "Check for prepending of jQuery object" );
QUnit.reset();