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
4d469b55
Commit
4d469b55
authored
Sep 24, 2012
by
Jacek Caban
Committed by
Alexandre Julliard
Sep 24, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Added function overriding tests.
parent
6d3bfe8e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
2 deletions
+22
-2
jstest.html
dlls/mshtml/tests/jstest.html
+22
-2
No files found.
dlls/mshtml/tests/jstest.html
View file @
4d469b55
...
...
@@ -103,15 +103,34 @@ function test_getter_call() {
var
e
=
document
.
getElementById
(
"divid"
);
e
.
myfunc
=
function
(
x
)
{
this
.
myf
i
nc_called
=
x
;
};
e
.
myfunc
=
function
(
x
)
{
this
.
myf
u
nc_called
=
x
;
};
e
.
myfunc
(
"test"
);
ok
(
e
.
myf
inc_called
===
"test"
,
"e.myfinc_called = "
+
e
.
myfi
nc_called
);
ok
(
e
.
myf
unc_called
===
"test"
,
"e.myfunc_called = "
+
e
.
myfu
nc_called
);
e
.
onmousedown
=
function
(
x
)
{
this
.
onmousedown_called
=
x
;
};
e
.
onmousedown
(
"test"
);
ok
(
e
.
onmousedown_called
===
"test"
,
"e.onmousedown_called = "
+
e
.
onmousedown_called
);
}
function
test_override_functions
()
{
function
override_func
()
{
return
"test"
;
}
ok
(
typeof
(
window
.
showModalDialog
)
===
"object"
,
"typeof(window.showModalDialog) = "
+
typeof
(
window
.
showModalDialog
));
window
.
showModalDialog
=
override_func
;
ok
(
window
.
showModalDialog
===
override_func
,
"window.showModalDialog != override_func"
);
ok
(
typeof
(
window
.
showModalDialog
)
===
"function"
,
"typeof(window.showModalDialog) = "
+
typeof
(
window
.
showModalDialog
));
document
.
body
.
innerHTML
=
'<div id="divid"></div>'
;
var
div
=
document
.
getElementById
(
"divid"
);
ok
(
typeof
(
div
.
addBehavior
)
===
"object"
,
"typeof(div.addBehavior) = "
+
typeof
(
div
.
addBehavior
));
div
.
addBehavior
=
override_func
;
ok
(
div
.
addBehavior
===
override_func
,
"div.addBehavior != override_func"
);
ok
(
typeof
(
div
.
addBehavior
)
===
"function"
,
"typeof(div.addBehavior) = "
+
typeof
(
div
.
addBehavior
));
var
tmp
=
div
.
addBehavior
();
ok
(
tmp
===
"test"
,
"div.addBehavior() = "
+
tmp
);
}
var
globalVar
=
false
;
function
runTest
()
{
...
...
@@ -128,6 +147,7 @@ function runTest() {
test_document_name_as_index
();
test_remove_style_attribute
();
test_getter_call
();
test_override_functions
();
var
r
=
window
.
execScript
(
"globalVar = true;"
);
ok
(
r
===
undefined
,
"execScript returned "
+
r
);
...
...
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