Commit a6dcf1be authored by alexpott's avatar alexpott

Issue #2392887 by droplet: Update JS lib: jQuery to 2.1.3

parent 6a3b965c
This diff is collapsed.
This diff is collapsed.
......@@ -314,13 +314,13 @@ html5shiv:
jquery:
remote: https://github.com/jquery/jquery
version: 2.1.0
version: 2.1.3
license:
name: MIT
url: https://github.com/jquery/jquery/blob/2.1.0/MIT-LICENSE.txt
url: https://github.com/jquery/jquery/blob/2.1.3/MIT-LICENSE.txt
gpl-compatible: true
js:
assets/vendor/jquery/jquery.js: { weight: -20 }
assets/vendor/jquery/jquery.min.js: { minified: true, weight: -20 }
jquery.cookie:
remote: https://github.com/carhartl/jquery-cookie
......
......@@ -37,7 +37,7 @@ function testPublicFileTransfer() {
// Test generating an URL to a shipped file (i.e. a file that is part of
// Drupal core, a module or a theme, for example a JavaScript file).
$filepath = 'core/assets/vendor/jquery/jquery.js';
$filepath = 'core/assets/vendor/jquery/jquery.min.js';
$url = file_create_url($filepath);
$this->assertEqual($GLOBALS['base_url'] . '/' . $filepath, $url, 'Correctly generated a URL for a shipped file.');
$this->drupalHead($url);
......
......@@ -32,7 +32,7 @@ protected function setUp() {
$this->image->setFilename(drupal_basename($this->image->getFileUri()));
$this->non_image = entity_create('file');
$this->non_image->setFileUri('core/assets/vendor/jquery/jquery.js');
$this->non_image->setFileUri('core/assets/vendor/jquery/jquery.min.js');
$this->non_image->setFilename(drupal_basename($this->non_image->getFileUri()));
}
......
......@@ -334,7 +334,7 @@ function testRenderDifferentWeight() {
$js = drupal_get_js();
$this->assertTrue(strpos($js, 'lighter.css') < strpos($js, 'first.js'), 'Lighter CSS assets are rendered first.');
$this->assertTrue(strpos($js, 'lighter.js') < strpos($js, 'first.js'), 'Lighter JavaScript assets are rendered first.');
$this->assertTrue(strpos($js, 'before-jquery.js') < strpos($js, 'core/assets/vendor/jquery/jquery.js'), 'Rendering a JavaScript file above jQuery.');
$this->assertTrue(strpos($js, 'before-jquery.js') < strpos($js, 'core/assets/vendor/jquery/jquery.min.js'), 'Rendering a JavaScript file above jQuery.');
}
/**
......
......@@ -32,7 +32,7 @@ function testShippedFileURL() {
// Test alteration of file URLs to use a CDN.
\Drupal::state()->set('file_test.hook_file_url_alter', 'cdn');
$filepath = 'core/assets/vendor/jquery/jquery.js';
$filepath = 'core/assets/vendor/jquery/jquery.min.js';
$url = file_create_url($filepath);
$this->assertEqual(FILE_URL_TEST_CDN_1 . '/' . $filepath, $url, 'Correctly generated a CDN URL for a shipped file.');
$filepath = 'core/misc/favicon.ico';
......@@ -41,7 +41,7 @@ function testShippedFileURL() {
// Test alteration of file URLs to use root-relative URLs.
\Drupal::state()->set('file_test.hook_file_url_alter', 'root-relative');
$filepath = 'core/assets/vendor/jquery/jquery.js';
$filepath = 'core/assets/vendor/jquery/jquery.min.js';
$url = file_create_url($filepath);
$this->assertEqual(base_path() . '/' . $filepath, $url, 'Correctly generated a root-relative URL for a shipped file.');
$filepath = 'core/misc/favicon.ico';
......@@ -50,7 +50,7 @@ function testShippedFileURL() {
// Test alteration of file URLs to use protocol-relative URLs.
\Drupal::state()->set('file_test.hook_file_url_alter', 'protocol-relative');
$filepath = 'core/assets/vendor/jquery/jquery.js';
$filepath = 'core/assets/vendor/jquery/jquery.min.js';
$url = file_create_url($filepath);
$this->assertEqual('/' . base_path() . '/' . $filepath, $url, 'Correctly generated a protocol-relative URL for a shipped file.');
$filepath = 'core/misc/favicon.ico';
......@@ -109,7 +109,7 @@ function testRelativeFileURL() {
\Drupal::setContainer($this->container);
// Shipped file.
$filepath = 'core/assets/vendor/jquery/jquery.js';
$filepath = 'core/assets/vendor/jquery/jquery.min.js';
$url = file_create_url($filepath);
$this->assertIdentical(base_path() . $filepath, file_url_transform_relative($url));
......
......@@ -718,7 +718,7 @@ function hook_element_info_alter(array &$types) {
*/
function hook_js_alter(&$javascript) {
// Swap out jQuery to use an updated version of the library.
$javascript['core/assets/vendor/jquery/jquery.js']['data'] = drupal_get_path('module', 'jquery_update') . '/jquery.js';
$javascript['core/assets/vendor/jquery/jquery.min.js']['data'] = drupal_get_path('module', 'jquery_update') . '/jquery.js';
}
/**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment