mirror of
https://github.com/jquery/jquery.git
synced 2024-11-23 02:54:22 +00:00
Selector: Add a test for throwing on post-comma invalid selectors
Sizzle's PR jquery/sizzle#456 introduced a test catching not throwing on badly-escaped identifiers by Firefox 3.6-5. Unfortunately, it was placed just before a test Opera 10-11 failed, making Opera fail quicker and not adding a post-comma invalid selector to rbuggyQSA. The issue was fixed in jquery/sizzle#463. This jQuery commit backports the test that Sizzle PR added as no workarounds are needed in browsers jQuery supports. Closes gh-4516 Ref jquery/sizzle#456 Ref jquery/sizzle#463
This commit is contained in:
parent
1d624c10b4
commit
6eee5f7f18
@ -179,7 +179,7 @@ QUnit.test( "XML Document Selectors", function( assert ) {
|
||||
} );
|
||||
|
||||
QUnit.test( "broken selectors throw", function( assert ) {
|
||||
assert.expect( 32 );
|
||||
assert.expect( 33 );
|
||||
|
||||
function broken( name, selector ) {
|
||||
assert.throws( function() {
|
||||
@ -197,6 +197,7 @@ QUnit.test( "broken selectors throw", function( assert ) {
|
||||
broken( "Broken Selector", "," );
|
||||
broken( "Broken Selector", ",a" );
|
||||
broken( "Broken Selector", "a," );
|
||||
broken( "Post-comma invalid selector", "*,:x" );
|
||||
broken( "Identifier with bad escape", "foo\\\fbaz" );
|
||||
broken( "Broken Selector", "[id=012345678901234567890123456789" );
|
||||
broken( "Doesn't exist", ":visble" );
|
||||
|
Loading…
Reference in New Issue
Block a user