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
bfebbbb1
Commit
bfebbbb1
authored
Jan 31, 2011
by
Jacek Caban
Committed by
Alexandre Julliard
Jan 31, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Added script execution time tests.
parent
aef44d69
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
57 additions
and
0 deletions
+57
-0
exectest.html
dlls/mshtml/tests/exectest.html
+32
-0
rsrc.rc
dlls/mshtml/tests/rsrc.rc
+3
-0
script.c
dlls/mshtml/tests/script.c
+22
-0
No files found.
dlls/mshtml/tests/exectest.html
0 → 100644
View file @
bfebbbb1
<html>
<body>
Script execution test
<div
id=
"b1"
></div>
<div
id=
"b2"
></div>
<div
id=
"b3"
></div>
<script>
function
ok
(
b
,
msg
)
{
return
external
.
ok
(
b
,
msg
);
}
var
executed
=
false
;
var
len
=
document
.
getElementsByTagName
(
'div'
).
length
;
ok
(
len
===
3
,
"init length = "
+
len
);
document
.
write
(
"<script>"
+
"var len = document.getElementsByTagName('div').length;"
+
"external.todo_wine_ok(len === 3, 'unexpected length ' + len);"
+
"executed = true;"
+
"<"
+
"/script>"
);
len
=
document
.
getElementsByTagName
(
'script'
).
length
;
external
.
todo_wine_ok
(
len
===
2
,
"script col length = "
+
len
);
external
.
todo_wine_ok
(
executed
,
"writen script not executed"
);
external
.
reportSuccess
();
</script>
<div
id=
"a1"
></div>
<div
id=
"a2"
></div>
<div
id=
"b3"
></div>
</body>
</html>
dlls/mshtml/tests/rsrc.rc
View file @
bfebbbb1
...
...
@@ -16,5 +16,8 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
/* @makedep: exectest.html */
exectest.html HTML "exectest.html"
/* @makedep: jstest.html */
jstest.html HTML "jstest.html"
dlls/mshtml/tests/script.c
View file @
bfebbbb1
...
...
@@ -139,6 +139,7 @@ DEFINE_EXPECT(external_success);
#define DISPID_EXTERNAL_OK 0x300000
#define DISPID_EXTERNAL_TRACE 0x300001
#define DISPID_EXTERNAL_REPORTSUCCESS 0x300002
#define DISPID_EXTERNAL_TODO_WINE_OK 0x300003
static
const
GUID
CLSID_TestScript
=
{
0x178fc163
,
0xf585
,
0x4e24
,{
0x9c
,
0x13
,
0x4b
,
0xb7
,
0xfa
,
0xf8
,
0x07
,
0x46
}};
...
...
@@ -493,6 +494,10 @@ static HRESULT WINAPI externalDisp_GetDispID(IDispatchEx *iface, BSTR bstrName,
*
pid
=
DISPID_EXTERNAL_REPORTSUCCESS
;
return
S_OK
;
}
if
(
!
strcmp_wa
(
bstrName
,
"todo_wine_ok"
))
{
*
pid
=
DISPID_EXTERNAL_TODO_WINE_OK
;
return
S_OK
;
}
ok
(
0
,
"unexpected name %s
\n
"
,
wine_dbgstr_w
(
bstrName
));
return
DISP_E_UNKNOWNNAME
;
...
...
@@ -546,6 +551,22 @@ static HRESULT WINAPI externalDisp_InvokeEx(IDispatchEx *iface, DISPID id, LCID
return
S_OK
;
case
DISPID_EXTERNAL_TODO_WINE_OK
:
ok
(
wFlags
==
INVOKE_FUNC
||
wFlags
==
(
INVOKE_FUNC
|
INVOKE_PROPERTYGET
),
"wFlags = %x
\n
"
,
wFlags
);
ok
(
pdp
!=
NULL
,
"pdp == NULL
\n
"
);
ok
(
pdp
->
rgvarg
!=
NULL
,
"rgvarg == NULL
\n
"
);
ok
(
!
pdp
->
rgdispidNamedArgs
,
"rgdispidNamedArgs != NULL
\n
"
);
ok
(
pdp
->
cArgs
==
2
,
"cArgs = %d
\n
"
,
pdp
->
cArgs
);
ok
(
!
pdp
->
cNamedArgs
,
"cNamedArgs = %d
\n
"
,
pdp
->
cNamedArgs
);
ok
(
pei
!=
NULL
,
"pei == NULL
\n
"
);
ok
(
V_VT
(
pdp
->
rgvarg
)
==
VT_BSTR
,
"V_VT(psp->rgvargs) = %d
\n
"
,
V_VT
(
pdp
->
rgvarg
));
ok
(
V_VT
(
pdp
->
rgvarg
+
1
)
==
VT_BOOL
,
"V_VT(psp->rgvargs+1) = %d
\n
"
,
V_VT
(
pdp
->
rgvarg
));
todo_wine
ok
(
V_BOOL
(
pdp
->
rgvarg
+
1
),
"%s
\n
"
,
wine_dbgstr_w
(
V_BSTR
(
pdp
->
rgvarg
)));
return
S_OK
;
default:
ok
(
0
,
"unexpected call
\n
"
);
return
E_NOTIMPL
;
...
...
@@ -2561,6 +2582,7 @@ static void run_js_script(const char *test_name)
static
void
run_js_tests
(
void
)
{
run_js_script
(
"jstest.html"
);
run_js_script
(
"exectest.html"
);
}
static
BOOL
init_registry
(
BOOL
init
)
...
...
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