aboutsummaryrefslogtreecommitdiffstats
path: root/test/unit/css.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/unit/css.js')
-rw-r--r--test/unit/css.js18
1 files changed, 13 insertions, 5 deletions
diff --git a/test/unit/css.js b/test/unit/css.js
index 24d490ef3..5d1a97dd0 100644
--- a/test/unit/css.js
+++ b/test/unit/css.js
@@ -970,7 +970,7 @@ QUnit.test( "show/hide 3.0, inline hidden", function( assert ) {
}
-QUnit[ jQuery.find.compile && jQuery.fn.toggle ? "test" : "skip" ]( "toggle()", function( assert ) {
+QUnit[ QUnit.jQuerySelectors && jQuery.fn.toggle ? "test" : "skip" ]( "toggle()", function( assert ) {
assert.expect( 9 );
var div, oldHide,
x = jQuery( "#foo" );
@@ -1003,7 +1003,7 @@ QUnit[ jQuery.find.compile && jQuery.fn.toggle ? "test" : "skip" ]( "toggle()",
jQuery.fn.hide = oldHide;
} );
-QUnit[ jQuery.find.compile && jQuery.fn.toggle ? "test" : "skip" ]( "detached toggle()", function( assert ) {
+QUnit[ QUnit.jQuerySelectors && jQuery.fn.toggle ? "test" : "skip" ]( "detached toggle()", function( assert ) {
assert.expect( 6 );
var detached = jQuery( "<p><a/><p>" ).find( "*" ).addBack(),
hiddenDetached = jQuery( "<p><a/></p>" ).find( "*" ).addBack().css( "display", "none" ),
@@ -1027,8 +1027,11 @@ QUnit[ jQuery.find.compile && jQuery.fn.toggle ? "test" : "skip" ]( "detached to
"cascade-hidden element in detached tree" );
} );
-QUnit[ jQuery.find.compile && jQuery.fn.toggle && document.body.getRootNode ? "test" : "skip" ]( "shadow toggle()", function( assert ) {
+QUnit[ QUnit.jQuerySelectors && jQuery.fn.toggle && document.body.getRootNode ? "test" : "skip" ](
+ "shadow toggle()", function( assert ) {
+
assert.expect( 4 );
+
jQuery( "<div id='shadowHost'></div>" ).appendTo( "#qunit-fixture" );
var shadowHost = document.querySelector( "#shadowHost" );
var shadowRoot = shadowHost.attachShadow( { mode: "open" } );
@@ -1459,7 +1462,7 @@ QUnit.test( "css opacity consistency across browsers (#12685)", function( assert
assert.equal( Math.round( el.css( "opacity" ) * 100 ), 10, "remove opacity override" );
} );
-QUnit[ jQuery.find.compile ? "test" : "skip" ]( ":visible/:hidden selectors", function( assert ) {
+QUnit[ QUnit.jQuerySelectors ? "test" : "skip" ]( ":visible/:hidden selectors", function( assert ) {
assert.expect( 18 );
var $div, $table, $a, $br;
@@ -1493,7 +1496,12 @@ QUnit[ jQuery.find.compile ? "test" : "skip" ]( ":visible/:hidden selectors", fu
$table.css( "display", "none" ).html( "<tr><td>cell</td><td>cell</td></tr>" );
assert.equal( jQuery( "#table td:visible" ).length, 0, "hidden cell children not perceived as visible (#4512)" );
- assert.t( "Is Visible", "#qunit-fixture div:visible:lt(2)", [ "foo", "nothiddendiv" ] );
+ if ( QUnit.jQuerySelectorsPos ) {
+ assert.t( "Is Visible", "#qunit-fixture div:visible:lt(2)", [ "foo", "nothiddendiv" ] );
+ } else {
+ assert.ok( "skip", "Positional selectors are not supported" );
+ }
+
assert.t( "Is Not Hidden", "#qunit-fixture:hidden", [] );
assert.t( "Is Hidden", "#form input:hidden", [ "hidden1", "hidden2" ] );