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
4462fb35
Commit
4462fb35
authored
Oct 04, 2009
by
Jacek Caban
Committed by
Alexandre Julliard
Oct 05, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
jscript: Query created ActiveXObject for IObjectWithSite interface.
parent
0713fde4
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
0 deletions
+21
-0
activex.c
dlls/jscript/activex.c
+7
-0
activex.c
dlls/jscript/tests/activex.c
+14
-0
No files found.
dlls/jscript/activex.c
View file @
4462fb35
...
...
@@ -59,6 +59,7 @@ static IInternetHostSecurityManager *get_sec_mgr(script_ctx_t *ctx)
static
IUnknown
*
create_activex_object
(
script_ctx_t
*
ctx
,
const
WCHAR
*
progid
)
{
IInternetHostSecurityManager
*
secmgr
;
IObjectWithSite
*
obj_site
;
struct
CONFIRMSAFETY
cs
;
IClassFactoryEx
*
cfex
;
IClassFactory
*
cf
;
...
...
@@ -114,6 +115,12 @@ static IUnknown *create_activex_object(script_ctx_t *ctx, const WCHAR *progid)
return
NULL
;
}
hres
=
IUnknown_QueryInterface
(
obj
,
&
IID_IObjectWithSite
,
(
void
**
)
&
obj_site
);
if
(
SUCCEEDED
(
hres
))
{
FIXME
(
"Set object site
\n
"
);
IObjectWithSite_Release
(
obj_site
);
}
return
obj
;
}
...
...
dlls/jscript/tests/activex.c
View file @
4462fb35
...
...
@@ -66,6 +66,7 @@ DEFINE_EXPECT(QueryCustomPolicy);
DEFINE_EXPECT
(
reportSuccess
);
DEFINE_EXPECT
(
Host_QS_SecMgr
);
DEFINE_EXPECT
(
Caller_QS_SecMgr
);
DEFINE_EXPECT
(
QI_IObjectWithSite
);
static
const
WCHAR
testW
[]
=
{
't'
,
'e'
,
's'
,
't'
,
0
};
...
...
@@ -132,6 +133,9 @@ static HRESULT WINAPI DispatchEx_QueryInterface(IDispatchEx *iface, REFIID riid,
if
(
FAILED
(
QI_IDispatch_hres
))
return
QI_IDispatch_hres
;
*
ppv
=
iface
;
}
else
if
(
IsEqualGUID
(
&
IID_IObjectWithSite
,
riid
))
{
CHECK_EXPECT
(
QI_IObjectWithSite
);
return
E_NOINTERFACE
;
}
else
{
return
E_NOINTERFACE
;
}
...
...
@@ -747,12 +751,14 @@ static void test_ActiveXObject(void)
SET_EXPECT
(
ProcessUrlAction
);
SET_EXPECT
(
CreateInstance
);
SET_EXPECT
(
QueryCustomPolicy
);
SET_EXPECT
(
QI_IObjectWithSite
);
SET_EXPECT
(
reportSuccess
);
parse_script_a
(
parser
,
"(new ActiveXObject('Wine.Test')).reportSuccess();"
);
CHECK_CALLED
(
Host_QS_SecMgr
);
CHECK_CALLED
(
ProcessUrlAction
);
CHECK_CALLED
(
CreateInstance
);
CHECK_CALLED
(
QueryCustomPolicy
);
CHECK_CALLED
(
QI_IObjectWithSite
);
CHECK_CALLED
(
reportSuccess
);
proc
=
parse_procedure_a
(
parser
,
"(new ActiveXObject('Wine.Test')).reportSuccess();"
);
...
...
@@ -760,21 +766,25 @@ static void test_ActiveXObject(void)
SET_EXPECT
(
ProcessUrlAction
);
SET_EXPECT
(
CreateInstance
);
SET_EXPECT
(
QueryCustomPolicy
);
SET_EXPECT
(
QI_IObjectWithSite
);
SET_EXPECT
(
reportSuccess
);
call_procedure
(
proc
,
NULL
);
CHECK_CALLED
(
ProcessUrlAction
);
CHECK_CALLED
(
CreateInstance
);
CHECK_CALLED
(
QueryCustomPolicy
);
CHECK_CALLED
(
QI_IObjectWithSite
);
CHECK_CALLED
(
reportSuccess
);
SET_EXPECT
(
ProcessUrlAction
);
SET_EXPECT
(
CreateInstance
);
SET_EXPECT
(
QueryCustomPolicy
);
SET_EXPECT
(
QI_IObjectWithSite
);
SET_EXPECT
(
reportSuccess
);
call_procedure
(
proc
,
&
caller_sp
);
CHECK_CALLED
(
ProcessUrlAction
);
CHECK_CALLED
(
CreateInstance
);
CHECK_CALLED
(
QueryCustomPolicy
);
CHECK_CALLED
(
QI_IObjectWithSite
);
CHECK_CALLED
(
reportSuccess
);
IDispatchEx_Release
(
proc
);
...
...
@@ -787,12 +797,14 @@ static void test_ActiveXObject(void)
SET_EXPECT
(
ProcessUrlAction
);
SET_EXPECT
(
CreateInstance
);
SET_EXPECT
(
QueryCustomPolicy
);
SET_EXPECT
(
QI_IObjectWithSite
);
SET_EXPECT
(
reportSuccess
);
call_procedure
(
proc
,
&
caller_sp
);
CHECK_CALLED
(
Host_QS_SecMgr
);
CHECK_CALLED
(
ProcessUrlAction
);
CHECK_CALLED
(
CreateInstance
);
CHECK_CALLED
(
QueryCustomPolicy
);
CHECK_CALLED
(
QI_IObjectWithSite
);
CHECK_CALLED
(
reportSuccess
);
parse_script_a
(
parser
,
"testException(function() { new ActiveXObject('Wine.TestABC'); }, 'Error', -2146827859);"
);
...
...
@@ -866,12 +878,14 @@ static void test_ActiveXObject(void)
SET_EXPECT
(
ProcessUrlAction
);
SET_EXPECT
(
CreateInstance
);
SET_EXPECT
(
QueryCustomPolicy
);
SET_EXPECT
(
QI_IObjectWithSite
);
SET_EXPECT
(
reportSuccess
);
parse_script_a
(
parser
,
"(new ActiveXObject('Wine.Test')).reportSuccess();"
);
CHECK_CALLED
(
Host_QS_SecMgr
);
CHECK_CALLED
(
ProcessUrlAction
);
CHECK_CALLED
(
CreateInstance
);
CHECK_CALLED
(
QueryCustomPolicy
);
CHECK_CALLED
(
QI_IObjectWithSite
);
CHECK_CALLED
(
reportSuccess
);
IUnknown_Release
(
parser
);
...
...
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