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
516731c8
Commit
516731c8
authored
Oct 22, 2012
by
Jacek Caban
Committed by
Alexandre Julliard
Oct 22, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Added more events tests.
parent
4940275d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
40 additions
and
2 deletions
+40
-2
events.html
dlls/mshtml/tests/events.html
+40
-2
No files found.
dlls/mshtml/tests/events.html
View file @
516731c8
...
...
@@ -78,12 +78,50 @@ function test_scriptfor() {
ok
(
typeof
(
div
.
ontest
)
===
"undefined"
,
"typeof(div.ontest) = "
+
typeof
(
div
.
ontest
));
}
function
runTests
()
{
function
test_handler_this
()
{
document
.
body
.
innerHTML
=
'<div id="d1"><div id="d2"></div></div>'
;
var
div1
=
document
.
getElementById
(
"d1"
);
var
div2
=
document
.
getElementById
(
"d2"
);
var
calls
=
new
Array
();
function
createHandler
(
name
,
node
)
{
return
function
()
{
ok
(
this
===
node
,
"this !== node"
);
calls
.
push
(
name
);
}
}
function
registerHandler
(
name
,
target
)
{
var
b
=
target
.
attachEvent
(
"onclick"
,
function
()
{
ok
(
this
===
window
,
"this !== window"
);
calls
.
push
(
name
+
"*"
);
});
ok
(
b
,
"attachEvent failed"
);
}
registerHandler
(
"div1"
,
div1
);
registerHandler
(
"div2"
,
div2
);
registerHandler
(
"body"
,
document
.
body
);
div1
.
onclick
=
createHandler
(
"div1"
,
div1
);
div2
.
onclick
=
createHandler
(
"div2"
,
div2
);
document
.
body
.
onclick
=
createHandler
(
"body"
,
document
.
body
);
div2
.
click
();
ok
(
calls
==
"div2,div2*,div1,div1*,body,body*"
,
"calls = "
+
calls
);
}
function
runTests
(
t
)
{
try
{
ok
(
cnt
==
1
,
"cnt="
+
cnt
+
" exception during loading?"
);
ok
(
t
===
window
,
"t !== window"
);
ok
(
typeof
(
window
.
onload
)
===
"function"
,
"typeof(window.onload) = "
+
typeof
(
window
.
onload
));
ok
(
document
.
body
.
onload
===
window
.
onload
,
"document.body.onload !== window.onload"
);
test_scriptfor
();
ondataavailable_test
();
test_handler_this
();
}
catch
(
e
)
{
ok
(
false
,
"Got an exception: "
+
e
.
message
);
}
...
...
@@ -92,7 +130,7 @@ function runTests() {
}
</script>
</head>
<body
onload=
"runTests()"
>
<body
onload=
"runTests(
this
)"
>
<div
id=
"divid"
></div>
<div
id=
"divid2"
></div>
<script
event=
"onclick"
for=
"divid2"
>
...
...
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