aboutsummaryrefslogtreecommitdiffstats
path: root/test/data
diff options
context:
space:
mode:
authorMichał Gołębiowski-Owczarek <m.goleb@gmail.com>2019-07-29 21:14:46 +0200
committerMichał Gołębiowski-Owczarek <m.goleb@gmail.com>2019-07-29 21:19:21 +0200
commit47835965bd100a3661d8299d8b769ceeb8b6ce48 (patch)
tree5ef322bc48cd27d5a5f004e6e3fcf955c67fc9eb /test/data
parent79b74e043a4ee737d44a95094ff1184e40bd5b16 (diff)
downloadjquery-47835965bd100a3661d8299d8b769ceeb8b6ce48.tar.gz
jquery-47835965bd100a3661d8299d8b769ceeb8b6ce48.zip
Selector: Inline Sizzle into the selector module
This commit removes Sizzle from jQuery, inlining its code & removing obsolete workarounds where applicable. The selector-native module has been removed. Further work on the selector module may decrease the size enough that it will no longer be necessary. If it turns out it's still useful, we'll reinstate it but the code will look different anyway as we'll want to share as much code as possible with the existing selector module. The Sizzle AUTHORS.txt file has been merged with the jQuery one - people are sorted by their first contributions to either of the two repositories. The commit reduces the gzipped jQuery size by 1460 bytes compared to master. Closes gh-4395
Diffstat (limited to 'test/data')
-rw-r--r--test/data/selector/cache.html (renamed from test/data/selector/sizzle_cache.html)2
-rw-r--r--test/data/selector/mixed_sort.html1
-rw-r--r--test/data/testinit.js18
3 files changed, 16 insertions, 5 deletions
diff --git a/test/data/selector/sizzle_cache.html b/test/data/selector/cache.html
index 513390cab..d88875ba1 100644
--- a/test/data/selector/sizzle_cache.html
+++ b/test/data/selector/cache.html
@@ -2,7 +2,7 @@
<html>
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
- <title>jQuery selector - sizzle cache</title>
+ <title>jQuery selector - cache</title>
<script src="../../jquery.js"></script>
<script src="../iframeTest.js"></script>
diff --git a/test/data/selector/mixed_sort.html b/test/data/selector/mixed_sort.html
index 090b9aaca..919b8ca66 100644
--- a/test/data/selector/mixed_sort.html
+++ b/test/data/selector/mixed_sort.html
@@ -12,7 +12,6 @@
var doc = parent.document,
unframed = [ doc.getElementById( "qunit-fixture" ), doc.body, doc.documentElement ],
framed = jQuery.find( "*" );
- parent.console.log( unframed );
startIframeTest(
jQuery.uniqueSort( unframed.concat( framed ) ),
diff --git a/test/data/testinit.js b/test/data/testinit.js
index 39d8d1d7b..cc547d1d2 100644
--- a/test/data/testinit.js
+++ b/test/data/testinit.js
@@ -45,7 +45,7 @@ this.q = function() {
/**
* Asserts that a select matches the given IDs
* @param {String} message - Assertion name
- * @param {String} selector - Sizzle selector
+ * @param {String} selector - jQuery selector
* @param {String} expectedIds - Array of ids to construct what is expected
* @param {(String|Node)=document} context - Selector context
* @example match("Check for something", "p", ["foo", "bar"]);
@@ -60,7 +60,7 @@ function match( message, selector, expectedIds, context, assert ) {
* Asserts that a select matches the given IDs.
* The select is not bound by a context.
* @param {String} message - Assertion name
- * @param {String} selector - Sizzle selector
+ * @param {String} selector - jQuery selector
* @param {String} expectedIds - Array of ids to construct what is expected
* @example t("Check for something", "p", ["foo", "bar"]);
*/
@@ -72,7 +72,7 @@ QUnit.assert.t = function( message, selector, expectedIds ) {
* Asserts that a select matches the given IDs.
* The select is performed within the `#qunit-fixture` context.
* @param {String} message - Assertion name
- * @param {String} selector - Sizzle selector
+ * @param {String} selector - jQuery selector
* @param {String} expectedIds - Array of ids to construct what is expected
* @example selectInFixture("Check for something", "p", ["foo", "bar"]);
*/
@@ -280,6 +280,18 @@ if ( !window.__karma__ ) {
QUnit.isSwarm = ( QUnit.urlParams.swarmURL + "" ).indexOf( "http" ) === 0;
QUnit.basicTests = ( QUnit.urlParams.module + "" ) === "basic";
+// Says whether jQuery positional selector extensions are supported.
+// A full selector engine is required to support them as they need to be evaluated
+// left-to-right. Remove that property when support for positional selectors is dropped.
+// if your custom jQuery versions relies more on native qSA.
+QUnit.jQuerySelectorsPos = true;
+
+// Says whether jQuery selector extensions are supported. Change that to `false`
+// if your custom jQuery versions relies more on native qSA.
+// This doesn't include support for positional selectors (see above).
+// TODO do we want to keep this or just assume support for jQuery extensions?
+QUnit.jQuerySelectors = true;
+
// Support: IE 11+
// A variable to make it easier to skip specific tests in IE, mostly
// testing integrations with newer Web features not supported by it.