diff --git a/test/data/support/csp.js b/test/data/support/csp.js index a25bd8ae5..5ebdcea08 100644 --- a/test/data/support/csp.js +++ b/test/data/support/csp.js @@ -1,3 +1,3 @@ -jQuery(function() { +jQuery( function() { parent.iframeCallback( getComputedSupport( jQuery.support ) ); -}); +} ); diff --git a/test/integration/data/gh-1764-fullscreen.js b/test/integration/data/gh-1764-fullscreen.js index c13c609f3..b2bb4cdb5 100644 --- a/test/integration/data/gh-1764-fullscreen.js +++ b/test/integration/data/gh-1764-fullscreen.js @@ -17,10 +17,10 @@ function bootstrapFrom( mainSelector, mode ) { document.webkitExitFullscreen; function isFullscreen() { - return !!(document.fullscreenElement || + return !!( document.fullscreenElement || document.mozFullScreenElement || document.webkitFullscreenElement || - document.msFullscreenElement); + document.msFullscreenElement ); } function requestFullscreen( element ) { @@ -82,7 +82,7 @@ function bootstrapFrom( mainSelector, mode ) { if ( isFullscreen() ) { exitFullscreen(); } else { - requestFullscreen( jQuery( mainSelector + " .container" )[0] ); + requestFullscreen( jQuery( mainSelector + " .container" )[ 0 ] ); } } diff --git a/test/jquery.js b/test/jquery.js index 586bd4202..233e696d9 100644 --- a/test/jquery.js +++ b/test/jquery.js @@ -1,5 +1,5 @@ // Use the right jQuery source on the test page (and iframes) -(function() { +( function() { /* global loadTests: false */ var src, @@ -8,21 +8,23 @@ require = window.require || parent.require; // iFrames won't load AMD (the iframe tests synchronously expect jQuery to be there) - QUnit.config.urlConfig.push({ + QUnit.config.urlConfig.push( { id: "amd", label: "Load with AMD", tooltip: "Load the AMD jQuery file (and its dependencies)" - }); + } ); + // If QUnit is on window, this is the main window // This detection allows AMD tests to be run in an iframe if ( QUnit.urlParams.amd && window.QUnit ) { - require.config({ + require.config( { baseUrl: path, paths: { sizzle: "external/sizzle/dist/sizzle" } - }); + } ); src = "src/jquery"; + // Include tests if specified if ( typeof loadTests !== "undefined" ) { require( [ src ], loadTests ); @@ -33,11 +35,11 @@ } // Config parameter to use minified jQuery - QUnit.config.urlConfig.push({ + QUnit.config.urlConfig.push( { id: "dev", label: "Load unminified", tooltip: "Load the development (unminified) jQuery file" - }); + } ); if ( QUnit.urlParams.dev ) { src = "dist/jquery.js"; } else { @@ -50,7 +52,7 @@ // Synchronous-only tests // Other tests are loaded from the test page if ( typeof loadTests !== "undefined" ) { - document.write( "