Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
9e2700b2
Commit
9e2700b2
authored
Nov 05, 2019
by
Jacek Caban
Committed by
Alexandre Julliard
Nov 05, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vbscript: Support changing script state to SCRIPTSTATE_INITIALIZED.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
706898dc
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
33 additions
and
5 deletions
+33
-5
vbscript.c
dlls/vbscript/tests/vbscript.c
+29
-0
vbscript.c
dlls/vbscript/vbscript.c
+4
-5
No files found.
dlls/vbscript/tests/vbscript.c
View file @
9e2700b2
...
...
@@ -796,6 +796,35 @@ static void test_vbscript_uninitializing(void)
test_state
(
script
,
SCRIPTSTATE_INITIALIZED
);
SET_EXPECT
(
OnStateChange_STARTED
);
hres
=
IActiveScript_SetScriptState
(
script
,
SCRIPTSTATE_STARTED
);
ok
(
hres
==
S_OK
,
"SetScriptState(SCRIPTSTATE_UNINITIALIZED) failed: %08x
\n
"
,
hres
);
CHECK_CALLED
(
OnStateChange_STARTED
);
SET_EXPECT
(
OnStateChange_INITIALIZED
);
hres
=
IActiveScript_SetScriptState
(
script
,
SCRIPTSTATE_INITIALIZED
);
ok
(
hres
==
S_OK
,
"SetScriptState(SCRIPTSTATE_UNINITIALIZED) failed: %08x
\n
"
,
hres
);
CHECK_CALLED
(
OnStateChange_INITIALIZED
);
hres
=
IActiveScript_SetScriptState
(
script
,
SCRIPTSTATE_INITIALIZED
);
ok
(
hres
==
S_OK
,
"SetScriptState(SCRIPTSTATE_UNINITIALIZED) failed: %08x
\n
"
,
hres
);
SET_EXPECT
(
OnStateChange_CLOSED
);
hres
=
IActiveScript_Close
(
script
);
ok
(
hres
==
S_OK
,
"Close failed: %08x
\n
"
,
hres
);
CHECK_CALLED
(
OnStateChange_CLOSED
);
test_state
(
script
,
SCRIPTSTATE_CLOSED
);
SET_EXPECT
(
GetLCID
);
SET_EXPECT
(
OnStateChange_INITIALIZED
);
hres
=
IActiveScript_SetScriptSite
(
script
,
&
ActiveScriptSite
);
ok
(
hres
==
S_OK
,
"SetScriptSite failed: %08x
\n
"
,
hres
);
CHECK_CALLED
(
GetLCID
);
CHECK_CALLED
(
OnStateChange_INITIALIZED
);
test_state
(
script
,
SCRIPTSTATE_INITIALIZED
);
SET_EXPECT
(
OnStateChange_CLOSED
);
hres
=
IActiveScript_Close
(
script
);
ok
(
hres
==
S_OK
,
"Close failed: %08x
\n
"
,
hres
);
...
...
dlls/vbscript/vbscript.c
View file @
9e2700b2
...
...
@@ -207,14 +207,13 @@ static void decrease_state(VBScript *This, SCRIPTSTATE state)
/* FALLTHROUGH */
case
SCRIPTSTATE_STARTED
:
case
SCRIPTSTATE_DISCONNECTED
:
if
(
This
->
state
==
SCRIPTSTATE_DISCONNECTED
)
change_state
(
This
,
SCRIPTSTATE_INITIALIZED
);
if
(
state
==
SCRIPTSTATE_INITIALIZED
)
break
;
change_state
(
This
,
SCRIPTSTATE_INITIALIZED
);
/* FALLTHROUGH */
case
SCRIPTSTATE_INITIALIZED
:
case
SCRIPTSTATE_UNINITIALIZED
:
change_state
(
This
,
state
);
if
(
state
==
SCRIPTSTATE_INITIALIZED
)
break
;
release_script
(
This
->
ctx
);
This
->
thread_id
=
0
;
break
;
...
...
@@ -469,7 +468,7 @@ static HRESULT WINAPI VBScript_SetScriptState(IActiveScript *iface, SCRIPTSTATE
exec_queued_code
(
This
->
ctx
);
break
;
case
SCRIPTSTATE_INITIALIZED
:
FIXME
(
"unimplemented SCRIPTSTATE_INITIALIZED
\n
"
);
decrease_state
(
This
,
SCRIPTSTATE_INITIALIZED
);
return
S_OK
;
case
SCRIPTSTATE_DISCONNECTED
:
FIXME
(
"unimplemented SCRIPTSTATE_DISCONNECTED
\n
"
);
...
...
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