aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorDavid Serduke <davidserduke@gmail.com>2007-12-05 05:01:46 +0000
committerDavid Serduke <davidserduke@gmail.com>2007-12-05 05:01:46 +0000
commit1be558203961c43043d6e9de3341e8bb9c3dcbf3 (patch)
tree9267ddb72365f30e25492bc899238bc4415a1069 /test
parent74a132d944886379456d562990c8fb217ab332e3 (diff)
downloadjquery-1be558203961c43043d6e9de3341e8bb9c3dcbf3.tar.gz
jquery-1be558203961c43043d6e9de3341e8bb9c3dcbf3.zip
Fixed #1419 where IE failed with .text() on an XML node. This is part of a series of tickets including #1264 where the context of the DOM manipulation was a problem in xml and iframe documents.
Diffstat (limited to 'test')
-rw-r--r--test/unit/core.js18
1 files changed, 15 insertions, 3 deletions
diff --git a/test/unit/core.js b/test/unit/core.js
index d69696a1e..5f2f81af8 100644
--- a/test/unit/core.js
+++ b/test/unit/core.js
@@ -173,7 +173,19 @@ test("$('html', context)", function() {
var $div = $("<div/>");
var $span = $("<span/>", $div);
- equals($span.length, 1, "Verify a span created with a div context works");
+ equals($span.length, 1, "Verify a span created with a div context works, #1763");
+});
+
+test("$(selector, xml).text(str) - Loaded via XML document", function() {
+ expect(2);
+ stop();
+ $.get('data/dashboard.xml', function(xml) {
+ // tests for #1419 where IE was a problem
+ equals( $("tab:first", xml).text(), "blabla", "Verify initial text correct" );
+ $("tab:first", xml).text("newtext");
+ equals( $("tab:first", xml).text(), "newtext", "Verify new text correct" );
+ start();
+ });
});
test("length", function() {
@@ -355,8 +367,8 @@ if ( !isLocal ) {
$('tab', xml).each(function() {
titles.push($(this).attr('title'));
});
- ok( titles[0] == 'Location', 'attr() in XML context: Check first title' );
- ok( titles[1] == 'Users', 'attr() in XML context: Check second title' );
+ equals( titles[0], 'Location', 'attr() in XML context: Check first title' );
+ equals( titles[1], 'Users', 'attr() in XML context: Check second title' );
start();
});
});