diff options
author | timmywil <timmywillisn@gmail.com> | 2012-06-20 11:19:24 -0400 |
---|---|---|
committer | Timmy Willison <timmywillisn@gmail.com> | 2012-12-13 15:31:02 -0500 |
commit | 05531fc4080ae24070930d15ae0cea7ae056457d (patch) | |
tree | ffd960db1001af31bbcaa1a785beea0c8f7fbe40 /test/unit/selector.js | |
parent | 452e32769d514d835988c544492e4083df2bc1d6 (diff) | |
download | jquery-05531fc4080ae24070930d15ae0cea7ae056457d.tar.gz jquery-05531fc4080ae24070930d15ae0cea7ae056457d.zip |
Adjust jQuery('html') detection to only match when html starts with '<' (not counting space characters). Fixes #11290.
Diffstat (limited to 'test/unit/selector.js')
-rw-r--r-- | test/unit/selector.js | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/test/unit/selector.js b/test/unit/selector.js index 76c4fbfba..57c32cf0d 100644 --- a/test/unit/selector.js +++ b/test/unit/selector.js @@ -17,7 +17,7 @@ test("element - jQuery only", function() { ok( jQuery("#length").length, "<input name=\"length\"> cannot be found under IE, see #945" ); ok( jQuery("#lengthtest input").length, "<input name=\"length\"> cannot be found under IE, see #945" ); - //#7533 + // #7533 equal( jQuery("<div id=\"A'B~C.D[E]\"><p>foo</p></div>").find("p").length, 1, "Find where context root is a node and has an ID with CSS3 meta characters" ); }); @@ -77,6 +77,18 @@ test("disconnected nodes", function() { equal( $div.is("div"), true, "Make sure .is('nodeName') works on disconnect nodes." ); }); +test("jQuery only - broken", 1, function() { + raises(function() { + // Setting context to null here somehow avoids QUnit's window.error handling + // making the e & e.message correct + // For whatever reason, without this, + // Sizzle.error will be called but no error will be seen in oldIE + jQuery.call( null, " <div/> " ); + }, function( e ) { + return e.message.indexOf("Syntax error") >= 0; + }, "leading space invalid: $(' <div/> ')" ); +}); + testIframe("selector/html5_selector", "attributes - jQuery.attr", function( jQuery, window, document ) { expect( 35 ); |