Skip to content

Commit 01162fa

Browse files
committed
All: Drop more legacy workarounds
1 parent dc90435 commit 01162fa

File tree

3 files changed

+4
-23
lines changed

3 files changed

+4
-23
lines changed

tests/unit/checkboxradio/core.js

+1-9
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ QUnit.test( "Radios - Initial class structure", function( assert ) {
3333
} );
3434

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

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

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

5648
QUnit.test( "Handle form association via form attribute", function( assert ) {

tests/unit/core/core.js

-4
Original file line numberDiff line numberDiff line change
@@ -149,10 +149,6 @@ QUnit.test( "Labels", function( assert ) {
149149
function testLabels( testType ) {
150150
var labels = dom.find( "#test" ).labels();
151151
var found = labels.map( function() {
152-
153-
// Support: Core 1.9 Only
154-
// We use String.prototype.trim because core 1.9.x silently fails
155-
// when white space is present
156152
return String.prototype.trim.call( $( this ).text() );
157153
} ).get();
158154

tests/unit/draggable/options.js

+3-10
Original file line numberDiff line numberDiff line change
@@ -1449,7 +1449,7 @@ QUnit.test( "zIndex, default, switching after initialization", function( assert
14491449
} );
14501450

14511451
QUnit.test( "iframeFix", function( assert ) {
1452-
assert.expect( 6 );
1452+
assert.expect( 5 );
14531453

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

14671467
element.one( "drag", function() {
1468-
var divOffset, iframeOffset,
1469-
div = $( this ).children().not( "iframe" );
1468+
var div = $( this ).children().not( "iframe" );
14701469

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

1477-
divOffset = div.offset();
1478-
iframeOffset = iframe.offset();
1479-
1480-
// Support: Edge <79 only
1481-
// In Edge Legacy these values differ a little.
1482-
assert.ok( Math.abs( divOffset.top - iframeOffset.top ) < 0.25, "Check top within 0.25 of expected" );
1483-
assert.ok( Math.abs( divOffset.left - iframeOffset.left ) < 0.25, "Check left within 0.25 of expected" );
1476+
assert.deepEqual( div.offset(), iframe.offset(), "blocking div is tall enough" );
14841477
} );
14851478

14861479
element.simulate( "drag", {

0 commit comments

Comments
 (0)