WordPress.org

Make WordPress Core


Ignore:
Timestamp:
08/21/2013 03:40:35 PM (7 years ago)
Author:
nacin
Message:

Remove sourceMappingURL from jquery.min.js.

props Jayjdk.
fixes #24994.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/tests/dependencies/jquery.php

    r25002 r25072  
    88
    99    function test_location_of_jquery() {
    10         if ( SCRIPT_DEBUG ) {
    11             $jquery_scripts = array(
    12                 'jquery-core'    => '/wp-includes/js/jquery/jquery.js',
    13                 'jquery-migrate' => '/wp-includes/js/jquery/jquery-migrate.min.js'
    14             );
    15         } else {
    16             $jquery_scripts = array(
    17                 'jquery-core'    => '/wp-includes/js/jquery/jquery.js',
    18                 'jquery-migrate' => '/wp-includes/js/jquery/jquery-migrate.js'
    19             );
    20         }
    2110        $scripts = new WP_Scripts;
    2211        wp_default_scripts( $scripts );
     12
     13        $jquery_scripts = array(
     14            'jquery-core' => '/wp-includes/js/jquery/jquery.js',
     15        );
     16        if ( SCRIPT_DEBUG )
     17            $jquery_scripts['jquery-migrate'] = '/wp-includes/js/jquery/jquery-migrate.js';
     18        else
     19            $jquery_scripts['jquery-migrate'] = '/wp-includes/js/jquery/jquery-migrate.min.js';
     20
    2321        $object = $scripts->query( 'jquery', 'registered' );
    2422        $this->assertInstanceOf( '_WP_Dependency', $object );
     
    6058        set_current_screen( 'front' );
    6159    }
     60
     61    /**
     62     * @ticket 24994
     63     */
     64    function test_exclusion_of_sourcemaps() {
     65        $contents = trim( file_get_contents( ABSPATH . WPINC . '/js/jquery/jquery.js' ) );
     66        $this->assertFalse( strpos( $contents, 'sourceMappingURL' ), 'Presence of sourceMappingURL' );
     67    }
    6268}
Note: See TracChangeset for help on using the changeset viewer.