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
6d03f929
Commit
6d03f929
authored
Mar 24, 2007
by
John Resig
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
An Ajax-based test was being run locally (which doesn't work).
parent
0f7c89cd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
8 deletions
+13
-8
coreTest.js
src/jquery/coreTest.js
+13
-8
No files found.
src/jquery/coreTest.js
View file @
6d03f929
...
@@ -159,7 +159,7 @@ test("index(Object)", function() {
...
@@ -159,7 +159,7 @@ test("index(Object)", function() {
});
});
test
(
"attr(String)"
,
function
()
{
test
(
"attr(String)"
,
function
()
{
expect
(
1
5
);
expect
(
1
3
);
ok
(
$
(
'#text1'
).
attr
(
'value'
)
==
"Test"
,
'Check for value attribute'
);
ok
(
$
(
'#text1'
).
attr
(
'value'
)
==
"Test"
,
'Check for value attribute'
);
ok
(
$
(
'#text1'
).
attr
(
'type'
)
==
"text"
,
'Check for type attribute'
);
ok
(
$
(
'#text1'
).
attr
(
'type'
)
==
"text"
,
'Check for type attribute'
);
ok
(
$
(
'#radio1'
).
attr
(
'type'
)
==
"radio"
,
'Check for type attribute'
);
ok
(
$
(
'#radio1'
).
attr
(
'type'
)
==
"radio"
,
'Check for type attribute'
);
...
@@ -175,15 +175,20 @@ test("attr(String)", function() {
...
@@ -175,15 +175,20 @@ test("attr(String)", function() {
$
(
'<a id="tAnchor5"></a>'
).
attr
(
'href'
,
'#5'
).
appendTo
(
'#main'
);
// using innerHTML in IE causes href attribute to be serialized to the full path
$
(
'<a id="tAnchor5"></a>'
).
attr
(
'href'
,
'#5'
).
appendTo
(
'#main'
);
// using innerHTML in IE causes href attribute to be serialized to the full path
ok
(
$
(
'#tAnchor5'
).
attr
(
'href'
)
==
"#5"
,
'Check for non-absolute href (an anchor)'
);
ok
(
$
(
'#tAnchor5'
).
attr
(
'href'
)
==
"#5"
,
'Check for non-absolute href (an anchor)'
);
stop
();
$
.
get
(
"data/dashboard.xml"
,
function
(
xml
)
{
ok
(
$
(
"locations"
,
xml
).
attr
(
"class"
)
==
"foo"
,
"Check class attribute in XML document"
);
ok
(
$
(
"location"
,
xml
).
attr
(
"for"
)
==
"bar"
,
"Check for attribute in XML document"
);
start
();
});
});
});
if
(
location
.
protocol
!=
"file:"
)
{
test
(
"attr(String) in XML Files"
,
function
()
{
expect
(
2
);
stop
();
$
.
get
(
"data/dashboard.xml"
,
function
(
xml
)
{
ok
(
$
(
"locations"
,
xml
).
attr
(
"class"
)
==
"foo"
,
"Check class attribute in XML document"
);
ok
(
$
(
"location"
,
xml
).
attr
(
"for"
)
==
"bar"
,
"Check for attribute in XML document"
);
start
();
});
});
}
test
(
"attr(String, Function)"
,
function
()
{
test
(
"attr(String, Function)"
,
function
()
{
expect
(
2
);
expect
(
2
);
ok
(
$
(
'#text1'
).
attr
(
'value'
,
function
()
{
return
this
.
id
})[
0
].
value
==
"text1"
,
"Set value from id"
);
ok
(
$
(
'#text1'
).
attr
(
'value'
,
function
()
{
return
this
.
id
})[
0
].
value
==
"text1"
,
"Set value from id"
);
...
...
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