Skip to content

Commit

Permalink
All: Drop more legacy workarounds
Browse files Browse the repository at this point in the history
  • Loading branch information
mgol committed May 13, 2024
1 parent b622607 commit ea17854
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 23 deletions.
10 changes: 1 addition & 9 deletions tests/unit/checkboxradio/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ QUnit.test( "Radios - Initial class structure", function( assert ) {
} );

QUnit.test( "Ensure checked after single click on checkbox label button", function( assert ) {
var ready = assert.async();
assert.expect( 2 );

$( "#check2" ).checkboxradio().on( "change", function() {
Expand All @@ -43,14 +42,7 @@ QUnit.test( "Ensure checked after single click on checkbox label button", functi
assert.hasClasses( label, "ui-state-active" );
} );

// Support: Opera
// Opera doesn't trigger a change event when this is done synchronously.
// This seems to be a side effect of another test, but until that can be
// tracked down, this delay will have to do.
setTimeout( function() {
$( "#check2" ).checkboxradio( "widget" ).simulate( "click" );
ready();
} );
$( "#check2" ).checkboxradio( "widget" ).simulate( "click" );
} );

QUnit.test( "Handle form association via form attribute", function( assert ) {
Expand Down
4 changes: 0 additions & 4 deletions tests/unit/core/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -149,10 +149,6 @@ QUnit.test( "Labels", function( assert ) {
function testLabels( testType ) {
var labels = dom.find( "#test" ).labels();
var found = labels.map( function() {

// Support: Core 1.9 Only
// We use String.prototype.trim because core 1.9.x silently fails
// when white space is present
return String.prototype.trim.call( $( this ).text() );
} ).get();

Expand Down
13 changes: 3 additions & 10 deletions tests/unit/draggable/options.js
Original file line number Diff line number Diff line change
Expand Up @@ -1449,7 +1449,7 @@ QUnit.test( "zIndex, default, switching after initialization", function( assert
} );

QUnit.test( "iframeFix", function( assert ) {
assert.expect( 6 );
assert.expect( 5 );

var element = $( "<div>" ).appendTo( "#qunit-fixture" ).draggable( { iframeFix: true } ),
element2 = $( "<div>" ).appendTo( "#qunit-fixture" ).draggable( { iframeFix: ".iframe" } ),
Expand All @@ -1465,22 +1465,15 @@ QUnit.test( "iframeFix", function( assert ) {
} );

element.one( "drag", function() {
var divOffset, iframeOffset,
div = $( this ).children().not( "iframe" );
var div = $( this ).children().not( "iframe" );

// https://bugs.jqueryui.com/ticket/9671
// iframeFix doesn't handle iframes that move
assert.equal( div.length, 1, "blocking div added as sibling" );
assert.equal( div.outerWidth(), iframe.outerWidth(), "blocking div is wide enough" );
assert.equal( div.outerHeight(), iframe.outerHeight(), "blocking div is tall enough" );

divOffset = div.offset();
iframeOffset = iframe.offset();

// Support: Edge <79 only
// In Edge Legacy these values differ a little.
assert.ok( Math.abs( divOffset.top - iframeOffset.top ) < 0.25, "Check top within 0.25 of expected" );
assert.ok( Math.abs( divOffset.left - iframeOffset.left ) < 0.25, "Check left within 0.25 of expected" );
assert.deepEqual( div.offset(), iframe.offset(), "blocking div is tall enough" );
} );

element.simulate( "drag", {
Expand Down

0 comments on commit ea17854

Please sign in to comment.