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
312534f2
Commit
312534f2
authored
Aug 07, 2015
by
Zhenbo Li
Committed by
Alexandre Julliard
Aug 07, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Add IHTMLOpinionElement::index property's getter implementation.
parent
a0a8556f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
2 deletions
+32
-2
htmloption.c
dlls/mshtml/htmloption.c
+15
-2
dom.c
dlls/mshtml/tests/dom.c
+17
-0
No files found.
dlls/mshtml/htmloption.c
View file @
312534f2
...
...
@@ -187,8 +187,21 @@ static HRESULT WINAPI HTMLOptionElement_put_index(IHTMLOptionElement *iface, LON
static
HRESULT
WINAPI
HTMLOptionElement_get_index
(
IHTMLOptionElement
*
iface
,
LONG
*
p
)
{
HTMLOptionElement
*
This
=
impl_from_IHTMLOptionElement
(
iface
);
FIXME
(
"(%p)->(%p)
\n
"
,
This
,
p
);
return
E_NOTIMPL
;
LONG
val
;
nsresult
nsres
;
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
p
);
if
(
!
p
)
return
E_INVALIDARG
;
nsres
=
nsIDOMHTMLOptionElement_GetIndex
(
This
->
nsoption
,
&
val
);
if
(
NS_FAILED
(
nsres
))
{
ERR
(
"GetIndex failed: %08x
\n
"
,
nsres
);
return
E_FAIL
;
}
*
p
=
val
;
return
S_OK
;
}
static
HRESULT
WINAPI
HTMLOptionElement_put_text
(
IHTMLOptionElement
*
iface
,
BSTR
v
)
...
...
dlls/mshtml/tests/dom.c
View file @
312534f2
...
...
@@ -1676,6 +1676,22 @@ static void _test_option_put_selected(unsigned line, IHTMLOptionElement *option,
_test_option_selected
(
line
,
option
,
b
);
}
#define test_option_get_index(o,s) _test_option_get_index(__LINE__,o,s)
static
void
_test_option_get_index
(
unsigned
line
,
IHTMLOptionElement
*
option
,
LONG
exval
)
{
HRESULT
hres
;
LONG
val
;
hres
=
IHTMLOptionElement_get_index
(
option
,
NULL
);
ok_
(
__FILE__
,
line
)(
hres
==
E_INVALIDARG
,
"Expect E_INVALIDARG, got %08x
\n
"
,
hres
);
val
=
12345678
;
hres
=
IHTMLOptionElement_get_index
(
option
,
&
val
);
ok_
(
__FILE__
,
line
)(
hres
==
S_OK
,
"get_index failed: %08x
\n
"
,
hres
);
ok_
(
__FILE__
,
line
)(
val
==
exval
||
broken
(
val
==
12345678
),
/* Win2k doesn't touch it*/
"value = %d, expected = %d
\n
"
,
val
,
exval
);
}
#define test_textarea_value(t,v) _test_textarea_value(__LINE__,t,v)
static
void
_test_textarea_value
(
unsigned
line
,
IUnknown
*
unk
,
const
char
*
exval
)
{
...
...
@@ -4966,6 +4982,7 @@ static void test_create_option_elem(IHTMLDocument2 *doc)
test_option_put_text
(
option
,
"new text"
);
test_option_put_value
(
option
,
"new value"
);
test_option_get_index
(
option
,
0
);
test_option_put_selected
(
option
,
VARIANT_TRUE
);
test_option_put_selected
(
option
,
VARIANT_FALSE
);
...
...
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