mirror of
https://github.com/jquery/jquery.git
synced 2024-11-23 02:54:22 +00:00
Build: correct style tests files which could be automatically corrected
This commit is contained in:
parent
99975c44ab
commit
e35bdc1a22
@ -1,3 +1,3 @@
|
||||
jQuery(function() {
|
||||
jQuery( function() {
|
||||
parent.iframeCallback( getComputedSupport( jQuery.support ) );
|
||||
});
|
||||
} );
|
||||
|
@ -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 ] );
|
||||
}
|
||||
}
|
||||
|
||||
|
20
test/jquery.js
vendored
20
test/jquery.js
vendored
@ -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( "<script src='" + path + "test/unit/ready.js'><\x2Fscript>");
|
||||
document.write( "<script src='" + path + "test/unit/ready.js'><\x2Fscript>" );
|
||||
}
|
||||
|
||||
})();
|
||||
} )();
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
"use strict";
|
||||
|
||||
require( "jsdom" ).env( "", function ( errors, window ) {
|
||||
require( "jsdom" ).env( "", function( errors, window ) {
|
||||
if ( errors ) {
|
||||
console.error( errors );
|
||||
return;
|
||||
@ -10,7 +10,7 @@ require( "jsdom" ).env( "", function ( errors, window ) {
|
||||
|
||||
var jQuery = require( ".." )( window );
|
||||
|
||||
exports.deferred = function () {
|
||||
exports.deferred = function() {
|
||||
var deferred = jQuery.Deferred();
|
||||
|
||||
return {
|
||||
|
Loading…
Reference in New Issue
Block a user