Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
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
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
43a178fa
Commit
43a178fa
authored
Oct 02, 2012
by
Jacek Caban
Committed by
Alexandre Julliard
Oct 02, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Added script 'for' and 'event' attributes tests.
parent
d40b1ae8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
0 deletions
+31
-0
events.html
dlls/mshtml/tests/events.html
+31
-0
No files found.
dlls/mshtml/tests/events.html
View file @
43a178fa
<html>
<head>
<script>
var
testevent_divid2_called
=
false
,
cnt
=
0
;
function
ok
(
b
,
m
)
{
return
external
.
ok
(
b
,
m
);
}
...
...
@@ -64,8 +66,23 @@ function ondataavailable_test() {
ok
(
evobj
.
type
===
"dataavailable"
,
"evobj.type = "
+
evobj
.
type
);
}
function
test_scriptfor
()
{
var
div
=
document
.
getElementById
(
"divid2"
);
ok
(
"onclick"
in
div
,
"testevent not in div"
);
ok
(
typeof
(
div
.
onclick
)
===
"function"
,
"typeof(div.onclick) = "
+
typeof
(
div
.
onclick
));
ok
(
testevent_divid2_called
===
false
,
"testevent_divid2_called = "
+
testevent_divid2_called
);
div
.
click
();
ok
(
testevent_divid2_called
===
true
,
"testevent_divid2_called = "
+
testevent_divid2_called
);
ok
(
!
(
"ontest"
in
div
),
"testevent in div"
);
ok
(
typeof
(
div
.
ontest
)
===
"undefined"
,
"typeof(div.ontest) = "
+
typeof
(
div
.
ontest
));
}
function
runTests
()
{
try
{
ok
(
cnt
==
1
,
"cnt="
+
cnt
+
" exception during loading?"
);
test_scriptfor
();
ondataavailable_test
();
}
catch
(
e
)
{
ok
(
false
,
"Got an exception: "
+
e
.
message
);
...
...
@@ -77,5 +94,19 @@ function runTests() {
</head>
<body
onload=
"runTests()"
>
<div
id=
"divid"
></div>
<div
id=
"divid2"
></div>
<script
event=
"onclick"
for=
"divid2"
>
testevent_divid2_called
=
true
;
</script>
<script
event=
"ontest"
for=
"divid2"
>
ok
(
false
,
"unexpected ontest"
);
</script>
<script>
(
function
()
{
var
div
=
document
.
getElementById
(
"divid2"
);
ok
(
div
.
onclick
===
null
,
"div.onclick = null"
);
cnt
++
;
})();
</script>
</body>
</html>
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