mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-25 11:38:44 +02:00
N°5621 Move jquery-migrate 3.1.0 to NPM
This commit is contained in:
32
node_modules/jquery-migrate/test/iframeTest.js
generated
vendored
Normal file
32
node_modules/jquery-migrate/test/iframeTest.js
generated
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
/*
|
||||
* Iframe-based unit tests support
|
||||
* Load this file immediately after jQuery, before jQuery Migrate
|
||||
*/
|
||||
|
||||
// Don't spew on in the console window when we build
|
||||
// Warning messages are available to parent test in jQuery.migrateWarnings
|
||||
if ( navigator.userAgent.indexOf( "PhantomJS" ) >= 0 ) {
|
||||
jQuery.migrateMute = true;
|
||||
}
|
||||
|
||||
// Support: IE9 only (no console at times)
|
||||
if ( !window.console ) {
|
||||
window.console = {};
|
||||
}
|
||||
|
||||
// Capture output so the test in the parent window can inspect it, and so the
|
||||
// initialization for the iframe doesn't show another Migrate startup header.
|
||||
var logOutput = "";
|
||||
|
||||
window.console.log = function() {
|
||||
logOutput += Array.prototype.join.call( arguments, " " ) + "\n";
|
||||
};
|
||||
|
||||
// Callback gets ( jQuery, window, document, log [, startIframe args ] )
|
||||
window.startIframeTest = function() {
|
||||
var args = Array.prototype.slice.call( arguments );
|
||||
|
||||
// Note: jQuery may be undefined if page did not load it
|
||||
args.unshift( window.jQuery, window, document, logOutput );
|
||||
window.parent.TestManager.iframeCallback.apply( null, args );
|
||||
};
|
||||
Reference in New Issue
Block a user