Remove sourceMappingURL from jquery.min.js.

props Jayjdk.
fixes #24994.



git-svn-id: https://develop.svn.wordpress.org/trunk@25072 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Nacin 2013-08-21 15:40:35 +00:00
parent ead4efa78a
commit d71f11bdd7
2 changed files with 17 additions and 12 deletions

File diff suppressed because one or more lines are too long

View File

@ -7,19 +7,17 @@
class Tests_Dependencies_jQuery extends WP_UnitTestCase {
function test_location_of_jquery() {
if ( SCRIPT_DEBUG ) {
$jquery_scripts = array(
'jquery-core' => '/wp-includes/js/jquery/jquery.js',
'jquery-migrate' => '/wp-includes/js/jquery/jquery-migrate.min.js'
);
} else {
$jquery_scripts = array(
'jquery-core' => '/wp-includes/js/jquery/jquery.js',
'jquery-migrate' => '/wp-includes/js/jquery/jquery-migrate.js'
);
}
$scripts = new WP_Scripts;
wp_default_scripts( $scripts );
$jquery_scripts = array(
'jquery-core' => '/wp-includes/js/jquery/jquery.js',
);
if ( SCRIPT_DEBUG )
$jquery_scripts['jquery-migrate'] = '/wp-includes/js/jquery/jquery-migrate.js';
else
$jquery_scripts['jquery-migrate'] = '/wp-includes/js/jquery/jquery-migrate.min.js';
$object = $scripts->query( 'jquery', 'registered' );
$this->assertInstanceOf( '_WP_Dependency', $object );
$this->assertEqualSets( $object->deps, array_keys( $jquery_scripts ) );
@ -59,4 +57,12 @@ class Tests_Dependencies_jQuery extends WP_UnitTestCase {
}
set_current_screen( 'front' );
}
/**
* @ticket 24994
*/
function test_exclusion_of_sourcemaps() {
$contents = trim( file_get_contents( ABSPATH . WPINC . '/js/jquery/jquery.js' ) );
$this->assertFalse( strpos( $contents, 'sourceMappingURL' ), 'Presence of sourceMappingURL' );
}
}