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
71bd828d
Commit
71bd828d
authored
Feb 24, 2011
by
gnarf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Grouped up the test
parent
14e9da51
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
13 deletions
+9
-13
ajax.js
test/unit/ajax.js
+9
-13
No files found.
test/unit/ajax.js
View file @
71bd828d
...
@@ -492,7 +492,7 @@ test(".ajax() - hash", function() {
...
@@ -492,7 +492,7 @@ test(".ajax() - hash", function() {
test
(
"jQuery ajax - cross-domain detection"
,
function
()
{
test
(
"jQuery ajax - cross-domain detection"
,
function
()
{
expect
(
4
);
expect
(
5
);
var
loc
=
document
.
location
,
var
loc
=
document
.
location
,
otherPort
=
loc
.
port
===
666
?
667
:
666
,
otherPort
=
loc
.
port
===
666
?
667
:
666
,
...
@@ -507,6 +507,14 @@ test("jQuery ajax - cross-domain detection", function() {
...
@@ -507,6 +507,14 @@ test("jQuery ajax - cross-domain detection", function() {
}
}
});
});
jQuery
.
ajax
({
url
:
'app:/path'
,
beforeSend
:
function
(
_
,
s
)
{
ok
(
s
.
crossDomain
,
"Adobe AIR app:/ URL detected as cross-domain"
);
return
false
;
}
});
jQuery
.
ajax
({
jQuery
.
ajax
({
dataType
:
"jsonp"
,
dataType
:
"jsonp"
,
url
:
loc
.
protocol
+
'//somewebsitethatdoesnotexist-656329477541.com:'
+
(
loc
.
port
||
80
),
url
:
loc
.
protocol
+
'//somewebsitethatdoesnotexist-656329477541.com:'
+
(
loc
.
port
||
80
),
...
@@ -2239,18 +2247,6 @@ test("jQuery.ajax - active counter", function() {
...
@@ -2239,18 +2247,6 @@ test("jQuery.ajax - active counter", function() {
ok
(
jQuery
.
active
==
0
,
"ajax active counter should be zero: "
+
jQuery
.
active
);
ok
(
jQuery
.
active
==
0
,
"ajax active counter should be zero: "
+
jQuery
.
active
);
});
});
test
(
"jQuery.ajax - compatible with AIR urls"
),
function
()
{
expect
(
1
);
stop
();
$
.
ajax
({
url
:
"app:/testing"
,
beforeSend
:
function
()
{
ok
(
this
.
crossDomain
,
"Detected crossDomain for AIR Url"
);
return
false
;
}
});
});
}
}
//}
//}
\ No newline at end of file
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