Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
J
jquery
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
夏彬
jquery
Commits
6c8dd7e7
Commit
6c8dd7e7
authored
Jan 12, 2012
by
Richard Gibson
Committed by
Dave Methvin
Jan 13, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix #10931: Make unit tests work without web access.
Applies
https://github.com/gibson042/jquery/tree/10931
to
dd900460
parent
cc5e8e38
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
sizzle_cache.html
test/data/selector/sizzle_cache.html
+2
-2
selector.js
test/unit/selector.js
+2
-2
No files found.
test/data/selector/sizzle_cache.html
View file @
6c8dd7e7
...
@@ -4,9 +4,9 @@
...
@@ -4,9 +4,9 @@
<meta
http-equiv=
"Content-type"
content=
"text/html; charset=utf-8"
>
<meta
http-equiv=
"Content-type"
content=
"text/html; charset=utf-8"
>
<title>
jQuery selector - sizzle cache
</title>
<title>
jQuery selector - sizzle cache
</title>
<script
src=
"
http://code.jquery.com/jquery-git.js
"
></script>
<script
src=
"
../include_js.php
"
></script>
<script>
<script>
var
$
git
=
jQuery
.
noConflict
(
true
);
var
$
cached
=
jQuery
.
noConflict
(
true
);
</script>
</script>
<script
src=
"../include_js.php"
></script>
<script
src=
"../include_js.php"
></script>
...
...
test/unit/selector.js
View file @
6c8dd7e7
...
@@ -133,10 +133,10 @@ testIframe("html5_selector", "attributes - jQuery.attr", function( jQuery, windo
...
@@ -133,10 +133,10 @@ testIframe("html5_selector", "attributes - jQuery.attr", function( jQuery, windo
});
});
testIframe
(
"sizzle_cache"
,
"Sizzle cache collides with multiple Sizzles on a page"
,
function
(
jQuery
,
window
,
document
)
{
testIframe
(
"sizzle_cache"
,
"Sizzle cache collides with multiple Sizzles on a page"
,
function
(
jQuery
,
window
,
document
)
{
var
$
git
=
window
.
$git
;
var
$
cached
=
window
.
$cached
;
expect
(
3
);
expect
(
3
);
deepEqual
(
$
git
(
'.test a'
).
get
(),
[
document
.
getElementById
(
'collision'
)
],
"Select collision anchor with first sizzle"
);
deepEqual
(
$
cached
(
'.test a'
).
get
(),
[
document
.
getElementById
(
'collision'
)
],
"Select collision anchor with first sizzle"
);
equal
(
jQuery
(
'.evil a'
).
length
,
0
,
"Select nothing with second sizzle"
);
equal
(
jQuery
(
'.evil a'
).
length
,
0
,
"Select nothing with second sizzle"
);
equal
(
jQuery
(
'.evil a'
).
length
,
0
,
"Select nothing again with second sizzle"
);
equal
(
jQuery
(
'.evil a'
).
length
,
0
,
"Select nothing again with second sizzle"
);
});
});
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment