From fc34dbc27124a49ba5e3d492de0bfc50fe75ba61 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Micha=C5=82=20Go=C5=82e=CC=A8biowski?= Date: Tue, 7 Mar 2017 16:36:28 +0100 Subject: [PATCH] Tests: Clean up after the CSS Custom Properties support test Ref bcec54ee7271e2d0e427bcb246e3d2009a8f84f9 Ref 619bf98d5b479f9582dbc40259b666f1c5a83146 --- test/unit/css.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/test/unit/css.js b/test/unit/css.js index d080a5fe0..b6bb95584 100644 --- a/test/unit/css.js +++ b/test/unit/css.js @@ -1558,10 +1558,12 @@ QUnit.test( "Do not throw on frame elements from css method (#15098)", function( ( function() { var supportsCssVars, - div = jQuery( "
" ).appendTo( "#qunit-fixture" )[ 0 ]; + elem = jQuery( "
" ).appendTo( document.body ), + div = elem[ 0 ]; div.style.setProperty( "--prop", "value" ); - supportsCssVars = getComputedStyle( div ).getPropertyValue( "--prop" ); + supportsCssVars = !!getComputedStyle( div ).getPropertyValue( "--prop" ); + elem.remove(); QUnit[ supportsCssVars ? "test" : "skip" ]( "css(--customProperty)", function( assert ) { jQuery( "#qunit-fixture" ).append( -- 2.39.5