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
48e2f942
Commit
48e2f942
authored
Sep 02, 2011
by
Piotr Caban
Committed by
Alexandre Julliard
Sep 02, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml/tests: Added IHTMLAttributeCollection IDispatchEx tests.
parent
648ed1e1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
50 additions
and
0 deletions
+50
-0
dom.c
dlls/mshtml/tests/dom.c
+50
-0
No files found.
dlls/mshtml/tests/dom.c
View file @
48e2f942
...
@@ -2413,6 +2413,54 @@ static void test_dynamic_properties(IHTMLElement *elem)
...
@@ -2413,6 +2413,54 @@ static void test_dynamic_properties(IHTMLElement *elem)
SysFreeString
(
attr1
);
SysFreeString
(
attr1
);
}
}
static
void
test_attr_collection_disp
(
IDispatch
*
disp
)
{
IDispatchEx
*
dispex
;
IHTMLDOMAttribute
*
attr
;
DISPPARAMS
dp
=
{
NULL
,
NULL
,
0
,
0
};
VARIANT
var
;
EXCEPINFO
ei
;
DISPID
id
;
BSTR
bstr
;
HRESULT
hres
;
hres
=
IDispatch_QueryInterface
(
disp
,
&
IID_IDispatchEx
,
(
void
**
)
&
dispex
);
ok
(
hres
==
S_OK
,
"QueryInterface failed: %08x
\n
"
,
hres
);
bstr
=
a2bstr
(
"0"
);
hres
=
IDispatchEx_GetDispID
(
dispex
,
bstr
,
fdexNameCaseSensitive
,
&
id
);
ok
(
hres
==
S_OK
,
"GetDispID failed: %08x
\n
"
,
hres
);
SysFreeString
(
bstr
);
VariantInit
(
&
var
);
hres
=
IDispatchEx_InvokeEx
(
dispex
,
id
,
LOCALE_NEUTRAL
,
INVOKE_PROPERTYGET
,
&
dp
,
&
var
,
&
ei
,
NULL
);
ok
(
hres
==
S_OK
,
"InvokeEx failed: %08x
\n
"
,
hres
);
ok
(
V_VT
(
&
var
)
==
VT_DISPATCH
,
"V_VT(var)=%d
\n
"
,
V_VT
(
&
var
));
ok
(
V_DISPATCH
(
&
var
)
!=
NULL
,
"V_DISPATCH(var) == NULL
\n
"
);
VariantClear
(
&
var
);
bstr
=
a2bstr
(
"attr1"
);
hres
=
IDispatchEx_GetDispID
(
dispex
,
bstr
,
fdexNameCaseSensitive
,
&
id
);
ok
(
hres
==
S_OK
,
"GetDispID failed: %08x
\n
"
,
hres
);
SysFreeString
(
bstr
);
VariantInit
(
&
var
);
hres
=
IDispatchEx_InvokeEx
(
dispex
,
id
,
LOCALE_NEUTRAL
,
INVOKE_PROPERTYGET
,
&
dp
,
&
var
,
&
ei
,
NULL
);
ok
(
hres
==
S_OK
,
"InvokeEx failed: %08x
\n
"
,
hres
);
ok
(
V_VT
(
&
var
)
==
VT_DISPATCH
,
"V_VT(var)=%d
\n
"
,
V_VT
(
&
var
));
ok
(
V_DISPATCH
(
&
var
)
!=
NULL
,
"V_DISPATCH(var) == NULL
\n
"
);
hres
=
IDispatch_QueryInterface
(
V_DISPATCH
(
&
var
),
&
IID_IHTMLDOMAttribute
,
(
void
**
)
&
attr
);
ok
(
hres
==
S_OK
,
"QueryInterface failed: %08x
\n
"
,
hres
);
hres
=
IHTMLDOMAttribute_get_nodeName
(
attr
,
&
bstr
);
ok
(
hres
==
S_OK
,
"get_nodeName failed: %08x
\n
"
,
hres
);
ok
(
!
strcmp_wa
(
bstr
,
"attr1"
),
"node name is %s, expected attr1
\n
"
,
wine_dbgstr_w
(
bstr
));
SysFreeString
(
bstr
);
IHTMLDOMAttribute_Release
(
attr
);
VariantClear
(
&
var
);
IDispatchEx_Release
(
dispex
);
}
static
void
test_attr_collection
(
IHTMLElement
*
elem
)
static
void
test_attr_collection
(
IHTMLElement
*
elem
)
{
{
static
const
WCHAR
testW
[]
=
{
't'
,
'e'
,
's'
,
't'
,
0
};
static
const
WCHAR
testW
[]
=
{
't'
,
'e'
,
's'
,
't'
,
0
};
...
@@ -2516,6 +2564,8 @@ static void test_attr_collection(IHTMLElement *elem)
...
@@ -2516,6 +2564,8 @@ static void test_attr_collection(IHTMLElement *elem)
ok
(
hres
==
E_INVALIDARG
,
"item failed: %08x
\n
"
,
hres
);
ok
(
hres
==
E_INVALIDARG
,
"item failed: %08x
\n
"
,
hres
);
VariantClear
(
&
id
);
VariantClear
(
&
id
);
test_attr_collection_disp
(
disp
);
IDispatch_Release
(
disp
);
IDispatch_Release
(
disp
);
IHTMLAttributeCollection_Release
(
attr_col
);
IHTMLAttributeCollection_Release
(
attr_col
);
}
}
...
...
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