aboutsummaryrefslogtreecommitdiffstats
path: root/test/unit/attributes.js
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/unit/attributes.js
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/unit/attributes.js')
-rw-r--r--test/unit/attributes.js23
1 files changed, 0 insertions, 23 deletions
diff --git a/test/unit/attributes.js b/test/unit/attributes.js
index 5f58cf1e7..1aca11482 100644
--- a/test/unit/attributes.js
+++ b/test/unit/attributes.js
@@ -488,29 +488,6 @@ QUnit.test( "attr(non-ASCII)", function( assert ) {
assert.equal( $div.attr( "AØC" ), "alpha", ".attr() exclusively lowercases characters in the range A-Z (gh-2730)" );
} );
-QUnit.test( "attr - extending the boolean attrHandle", function( assert ) {
- assert.expect( 1 );
- var called = false,
- origAttrHandleHadChecked = "checked" in jQuery.expr.attrHandle,
- origAttrHandleChecked = jQuery.expr.attrHandle.checked,
- _handle = origAttrHandleChecked || $.noop;
- jQuery.expr.attrHandle.checked = function() {
- called = true;
- _handle.apply( this, arguments );
- };
- jQuery( "#qunit-fixture input" ).attr( "checked" );
- called = false;
- jQuery( "#qunit-fixture input" ).attr( "checked" );
- assert.ok( called, "The boolean attrHandle does not drop custom attrHandles" );
-
- if ( origAttrHandleHadChecked ) {
- jQuery.expr.attrHandle.checked = origAttrHandleChecked;
- } else {
- delete jQuery.expr.attrHandle.checked;
- }
-
-} );
-
QUnit.test( "attr(String, Object) - Loaded via XML document", function( assert ) {
assert.expect( 2 );
var xml = createDashboardXML(),