Tests: Refactor testIframe() to make it DRYer and more consistent

Ref gh-3040
Closes gh-3049
This commit is contained in:
Dave Methvin
2016-04-10 15:42:44 -04:00
parent 08d73d7f9c
commit e5ffcb0838
42 changed files with 142 additions and 110 deletions

View File

@@ -289,10 +289,10 @@ QUnit[ jQuery.find.compile ? "test" : "skip" ]( "disconnected nodes", function(
assert.equal( $opt.is( ":selected" ), true, "selected option" );
} );
testIframeWithCallback(
testIframe(
"attributes - jQuery.attr",
"selector/html5_selector.html",
function( jQuery, window, document, assert ) {
function( assert, jQuery, window, document ) {
assert.expect( 38 );
/**
@@ -489,10 +489,10 @@ QUnit.test( "jQuery.uniqueSort", function( assert ) {
assert.strictEqual( jQuery.unique, jQuery.uniqueSort, "jQuery.unique() is an alias for jQuery.uniqueSort()" );
} );
testIframeWithCallback(
testIframe(
"Sizzle cache collides with multiple Sizzles on a page",
"selector/sizzle_cache.html",
function( jQuery, window, document, assert ) {
function( assert, jQuery, window, document ) {
var $cached = window[ "$cached" ];
assert.expect( 4 );