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 ) );
|
parent.iframeCallback( getComputedSupport( jQuery.support ) );
|
||||||
});
|
} );
|
||||||
|
@ -17,10 +17,10 @@ function bootstrapFrom( mainSelector, mode ) {
|
|||||||
document.webkitExitFullscreen;
|
document.webkitExitFullscreen;
|
||||||
|
|
||||||
function isFullscreen() {
|
function isFullscreen() {
|
||||||
return !!(document.fullscreenElement ||
|
return !!( document.fullscreenElement ||
|
||||||
document.mozFullScreenElement ||
|
document.mozFullScreenElement ||
|
||||||
document.webkitFullscreenElement ||
|
document.webkitFullscreenElement ||
|
||||||
document.msFullscreenElement);
|
document.msFullscreenElement );
|
||||||
}
|
}
|
||||||
|
|
||||||
function requestFullscreen( element ) {
|
function requestFullscreen( element ) {
|
||||||
@ -82,7 +82,7 @@ function bootstrapFrom( mainSelector, mode ) {
|
|||||||
if ( isFullscreen() ) {
|
if ( isFullscreen() ) {
|
||||||
exitFullscreen();
|
exitFullscreen();
|
||||||
} else {
|
} 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)
|
// Use the right jQuery source on the test page (and iframes)
|
||||||
(function() {
|
( function() {
|
||||||
/* global loadTests: false */
|
/* global loadTests: false */
|
||||||
|
|
||||||
var src,
|
var src,
|
||||||
@ -8,21 +8,23 @@
|
|||||||
require = window.require || parent.require;
|
require = window.require || parent.require;
|
||||||
|
|
||||||
// iFrames won't load AMD (the iframe tests synchronously expect jQuery to be there)
|
// iFrames won't load AMD (the iframe tests synchronously expect jQuery to be there)
|
||||||
QUnit.config.urlConfig.push({
|
QUnit.config.urlConfig.push( {
|
||||||
id: "amd",
|
id: "amd",
|
||||||
label: "Load with AMD",
|
label: "Load with AMD",
|
||||||
tooltip: "Load the AMD jQuery file (and its dependencies)"
|
tooltip: "Load the AMD jQuery file (and its dependencies)"
|
||||||
});
|
} );
|
||||||
|
|
||||||
// If QUnit is on window, this is the main window
|
// If QUnit is on window, this is the main window
|
||||||
// This detection allows AMD tests to be run in an iframe
|
// This detection allows AMD tests to be run in an iframe
|
||||||
if ( QUnit.urlParams.amd && window.QUnit ) {
|
if ( QUnit.urlParams.amd && window.QUnit ) {
|
||||||
require.config({
|
require.config( {
|
||||||
baseUrl: path,
|
baseUrl: path,
|
||||||
paths: {
|
paths: {
|
||||||
sizzle: "external/sizzle/dist/sizzle"
|
sizzle: "external/sizzle/dist/sizzle"
|
||||||
}
|
}
|
||||||
});
|
} );
|
||||||
src = "src/jquery";
|
src = "src/jquery";
|
||||||
|
|
||||||
// Include tests if specified
|
// Include tests if specified
|
||||||
if ( typeof loadTests !== "undefined" ) {
|
if ( typeof loadTests !== "undefined" ) {
|
||||||
require( [ src ], loadTests );
|
require( [ src ], loadTests );
|
||||||
@ -33,11 +35,11 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Config parameter to use minified jQuery
|
// Config parameter to use minified jQuery
|
||||||
QUnit.config.urlConfig.push({
|
QUnit.config.urlConfig.push( {
|
||||||
id: "dev",
|
id: "dev",
|
||||||
label: "Load unminified",
|
label: "Load unminified",
|
||||||
tooltip: "Load the development (unminified) jQuery file"
|
tooltip: "Load the development (unminified) jQuery file"
|
||||||
});
|
} );
|
||||||
if ( QUnit.urlParams.dev ) {
|
if ( QUnit.urlParams.dev ) {
|
||||||
src = "dist/jquery.js";
|
src = "dist/jquery.js";
|
||||||
} else {
|
} else {
|
||||||
@ -50,7 +52,7 @@
|
|||||||
// Synchronous-only tests
|
// Synchronous-only tests
|
||||||
// Other tests are loaded from the test page
|
// Other tests are loaded from the test page
|
||||||
if ( typeof loadTests !== "undefined" ) {
|
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";
|
"use strict";
|
||||||
|
|
||||||
require( "jsdom" ).env( "", function ( errors, window ) {
|
require( "jsdom" ).env( "", function( errors, window ) {
|
||||||
if ( errors ) {
|
if ( errors ) {
|
||||||
console.error( errors );
|
console.error( errors );
|
||||||
return;
|
return;
|
||||||
@ -10,7 +10,7 @@ require( "jsdom" ).env( "", function ( errors, window ) {
|
|||||||
|
|
||||||
var jQuery = require( ".." )( window );
|
var jQuery = require( ".." )( window );
|
||||||
|
|
||||||
exports.deferred = function () {
|
exports.deferred = function() {
|
||||||
var deferred = jQuery.Deferred();
|
var deferred = jQuery.Deferred();
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
Loading…
Reference in New Issue
Block a user