Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Adding another test for an issue in Gecko's matchesSelector implement…

…ation. Fixes #7243.
  • Loading branch information...
commit 9be7461c3c7e85b1995766533db8806eb0909779 1 parent 0174518
John Resig authored October 21, 2010

Showing 1 changed file with 8 additions and 2 deletions. Show diff stats Hide diff stats

  1. 10  test/unit/selector.js
10  test/unit/selector.js
@@ -225,7 +225,7 @@ test("child and adjacent", function() {
225 225
 });
226 226
 
227 227
 test("attributes", function() {
228  
-	expect(34);
  228
+	expect(35);
229 229
 	t( "Attribute Exists", "a[title]", ["google"] );
230 230
 	t( "Attribute Exists", "*[title]", ["google"] );
231 231
 	t( "Attribute Exists", "[title]", ["google"] );
@@ -263,6 +263,9 @@ test("attributes", function() {
263 263
 	t( "Attribute Contains", "a[href *= 'google']", ["google","groups"] );
264 264
 	t( "Attribute Is Not Equal", "#ap a[hreflang!='en']", ["google","groups","anchor1"] );
265 265
 
  266
+	var opt = document.getElementById("option1a");
  267
+	ok( (window.Sizzle || window.jQuery.find).matchesSelector( opt, "[id*=option1][type!=checkbox]" ), "Attribute Is Not Equal Matches" );
  268
+
266 269
 	t("Empty values", "#select1 option[value='']", ["option1a"]);
267 270
 	t("Empty values", "#select1 option[value!='']", ["option1b","option1c","option1d"]);
268 271
 	
@@ -320,10 +323,13 @@ test("pseudo - child", function() {
320 323
 });
321 324
 
322 325
 test("pseudo - misc", function() {
323  
-	expect(6);
  326
+	expect(7);
324 327
 
325 328
 	t( "Headers", ":header", ["qunit-header", "qunit-banner", "qunit-userAgent"] );
326 329
 	t( "Has Children - :has()", "p:has(a)", ["firstp","ap","en","sap"] );
  330
+	
  331
+	var select = document.getElementById("select1");
  332
+	ok( (window.Sizzle || window.jQuery.find).matchesSelector( select, ":has(option)" ), "Has Option Matches" );
327 333
 
328 334
 	t( "Text Contains", "a:contains(Google)", ["google","groups"] );
329 335
 	t( "Text Contains", "a:contains(Google Groups)", ["groups"] );

0 notes on commit 9be7461

Please sign in to comment.
Something went wrong with that request. Please try again.