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
7bce21c0
Commit
7bce21c0
authored
Mar 09, 2015
by
Jacek Caban
Committed by
Alexandre Julliard
Mar 10, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Added IHTMLDOMAttribute2::get_expando implementation.
parent
25845c70
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
46 additions
and
13 deletions
+46
-13
htmlattr.c
dlls/mshtml/htmlattr.c
+5
-2
dom.c
dlls/mshtml/tests/dom.c
+41
-11
No files found.
dlls/mshtml/htmlattr.c
View file @
7bce21c0
...
...
@@ -314,8 +314,11 @@ static HRESULT WINAPI HTMLDOMAttribute2_get_value(IHTMLDOMAttribute2 *iface, BST
static
HRESULT
WINAPI
HTMLDOMAttribute2_get_expando
(
IHTMLDOMAttribute2
*
iface
,
VARIANT_BOOL
*
p
)
{
HTMLDOMAttribute
*
This
=
impl_from_IHTMLDOMAttribute2
(
iface
);
FIXME
(
"(%p)->(%p)
\n
"
,
This
,
p
);
return
E_NOTIMPL
;
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
p
);
*
p
=
get_dispid_type
(
This
->
dispid
)
==
DISPEXPROP_BUILTIN
?
VARIANT_FALSE
:
VARIANT_TRUE
;
return
S_OK
;
}
static
HRESULT
WINAPI
HTMLDOMAttribute2_get_nodeType
(
IHTMLDOMAttribute2
*
iface
,
LONG
*
p
)
...
...
dlls/mshtml/tests/dom.c
View file @
7bce21c0
...
...
@@ -974,6 +974,17 @@ static IHTMLLabelElement *_get_label_iface(unsigned line, IUnknown *unk)
return
ret
;
}
#define get_attr2_iface(u) _get_attr2_iface(__LINE__,u)
static
IHTMLDOMAttribute2
*
_get_attr2_iface
(
unsigned
line
,
IUnknown
*
unk
)
{
IHTMLDOMAttribute2
*
ret
;
HRESULT
hres
;
hres
=
IUnknown_QueryInterface
(
unk
,
&
IID_IHTMLDOMAttribute2
,
(
void
**
)
&
ret
);
ok_
(
__FILE__
,
line
)
(
hres
==
S_OK
,
"Could not get IHTMLDOMAttribute2: %08x
\n
"
,
hres
);
return
ret
;
}
#define test_node_name(u,n) _test_node_name(__LINE__,u,n)
static
void
_test_node_name
(
unsigned
line
,
IUnknown
*
unk
,
const
char
*
exname
)
{
...
...
@@ -1729,6 +1740,31 @@ static void _test_comment_text(unsigned line, IUnknown *unk, const char *extext)
SysFreeString
(
text
);
}
#define test_attr_specified(a,b) _test_attr_specified(__LINE__,a,b)
static
void
_test_attr_specified
(
unsigned
line
,
IHTMLDOMAttribute
*
attr
,
VARIANT_BOOL
expected
)
{
VARIANT_BOOL
specified
;
HRESULT
hres
;
hres
=
IHTMLDOMAttribute_get_specified
(
attr
,
&
specified
);
ok_
(
__FILE__
,
line
)(
hres
==
S_OK
,
"get_specified failed: %08x
\n
"
,
hres
);
ok_
(
__FILE__
,
line
)(
specified
==
expected
,
"specified = %x, expected %x
\n
"
,
specified
,
expected
);
}
#define test_attr_expando(a,b) _test_attr_expando(__LINE__,a,b)
static
void
_test_attr_expando
(
unsigned
line
,
IHTMLDOMAttribute
*
attr
,
VARIANT_BOOL
expected
)
{
IHTMLDOMAttribute2
*
attr2
=
_get_attr2_iface
(
line
,
(
IUnknown
*
)
attr
);
VARIANT_BOOL
expando
;
HRESULT
hres
;
hres
=
IHTMLDOMAttribute2_get_expando
(
attr2
,
&
expando
);
ok_
(
__FILE__
,
line
)(
hres
==
S_OK
,
"get_expando failed: %08x
\n
"
,
hres
);
ok_
(
__FILE__
,
line
)(
expando
==
expected
,
"expando = %x, expected %x
\n
"
,
expando
,
expected
);
IHTMLDOMAttribute2_Release
(
attr2
);
}
#define test_comment_attrs(c) _test_comment_attrs(__LINE__,c)
static
void
_test_comment_attrs
(
unsigned
line
,
IUnknown
*
unk
)
{
...
...
@@ -1753,6 +1789,8 @@ static void _test_comment_attrs(unsigned line, IUnknown *unk)
ok
(
hres
==
S_OK
,
"getAttributeNode failed: %08x
\n
"
,
hres
);
ok
(
attr
!=
NULL
,
"attr == NULL
\n
"
);
test_attr_expando
(
attr
,
VARIANT_TRUE
);
IHTMLDOMAttribute_Release
(
attr
);
IHTMLCommentElement_Release
(
comment
);
IHTMLElement_Release
(
elem
);
...
...
@@ -3171,12 +3209,14 @@ static void test_attr_collection(IHTMLElement *elem)
ok
(
hres
==
S_OK
,
"%d) get_nodeValue failed: %08x
\n
"
,
i
,
hres
);
ok
(
V_VT
(
&
val
)
==
VT_BSTR
,
"id: V_VT(&val) = %d
\n
"
,
V_VT
(
&
val
));
ok
(
!
strcmp_wa
(
V_BSTR
(
&
val
),
"attr"
),
"id: V_BSTR(&val) = %s
\n
"
,
wine_dbgstr_w
(
V_BSTR
(
&
val
)));
test_attr_expando
(
dom_attr
,
VARIANT_FALSE
);
}
else
if
(
!
strcmp_wa
(
name
,
"attr1"
))
{
checked
++
;
hres
=
IHTMLDOMAttribute_get_nodeValue
(
dom_attr
,
&
val
);
ok
(
hres
==
S_OK
,
"%d) get_nodeValue failed: %08x
\n
"
,
i
,
hres
);
ok
(
V_VT
(
&
val
)
==
VT_BSTR
,
"attr1: V_VT(&val) = %d
\n
"
,
V_VT
(
&
val
));
ok
(
!
strcmp_wa
(
V_BSTR
(
&
val
),
"attr1"
),
"attr1: V_BSTR(&val) = %s
\n
"
,
wine_dbgstr_w
(
V_BSTR
(
&
val
)));
test_attr_expando
(
dom_attr
,
VARIANT_TRUE
);
}
else
if
(
!
strcmp_wa
(
name
,
"attr2"
))
{
checked
++
;
hres
=
IHTMLDOMAttribute_get_nodeValue
(
dom_attr
,
&
val
);
...
...
@@ -3219,17 +3259,6 @@ static void test_attr_collection(IHTMLElement *elem)
IHTMLAttributeCollection_Release
(
attr_col
);
}
#define test_attr_specified(a,b) _test_attr_specified(__LINE__,a,b)
static
void
_test_attr_specified
(
unsigned
line
,
IHTMLDOMAttribute
*
attr
,
VARIANT_BOOL
expected
)
{
VARIANT_BOOL
specified
;
HRESULT
hres
;
hres
=
IHTMLDOMAttribute_get_specified
(
attr
,
&
specified
);
ok_
(
__FILE__
,
line
)(
hres
==
S_OK
,
"get_specified failed: %08x
\n
"
,
hres
);
ok_
(
__FILE__
,
line
)(
specified
==
expected
,
"specified = %x, expected %x
\n
"
,
specified
,
expected
);
}
#define test_elem_id(e,i) _test_elem_id(__LINE__,e,i)
static
void
_test_elem_id
(
unsigned
line
,
IUnknown
*
unk
,
const
char
*
exid
)
{
...
...
@@ -8019,6 +8048,7 @@ static void test_attr(IHTMLElement *elem)
attr
=
get_elem_attr_node
((
IUnknown
*
)
elem
,
"tabIndex"
,
TRUE
);
test_attr_specified
(
attr
,
VARIANT_FALSE
);
test_attr_expando
(
attr
,
VARIANT_FALSE
);
IHTMLDOMAttribute_Release
(
attr
);
}
...
...
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