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
c2759cb8
Commit
c2759cb8
authored
Jun 24, 2008
by
Jacek Caban
Committed by
Alexandre Julliard
Jun 25, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Added IHTMLSelectElement::put_value implementation.
parent
8bedda7e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
42 additions
and
3 deletions
+42
-3
htmlselect.c
dlls/mshtml/htmlselect.c
+12
-2
dom.c
dlls/mshtml/tests/dom.c
+30
-1
No files found.
dlls/mshtml/htmlselect.c
View file @
c2759cb8
...
...
@@ -228,8 +228,18 @@ static HRESULT WINAPI HTMLSelectElement_get_type(IHTMLSelectElement *iface, BSTR
static
HRESULT
WINAPI
HTMLSelectElement_put_value
(
IHTMLSelectElement
*
iface
,
BSTR
v
)
{
HTMLSelectElement
*
This
=
HTMLSELECT_THIS
(
iface
);
FIXME
(
"(%p)->(%s)
\n
"
,
This
,
debugstr_w
(
v
));
return
E_NOTIMPL
;
nsAString
value_str
;
nsresult
nsres
;
TRACE
(
"(%p)->(%s)
\n
"
,
This
,
debugstr_w
(
v
));
nsAString_Init
(
&
value_str
,
v
);
nsres
=
nsIDOMHTMLSelectElement_SetValue
(
This
->
nsselect
,
&
value_str
);
nsAString_Finish
(
&
value_str
);
if
(
NS_FAILED
(
nsres
))
ERR
(
"SetValue failed: %08x
\n
"
,
nsres
);
return
S_OK
;
}
static
HRESULT
WINAPI
HTMLSelectElement_get_value
(
IHTMLSelectElement
*
iface
,
BSTR
*
p
)
...
...
dlls/mshtml/tests/dom.c
View file @
c2759cb8
...
...
@@ -43,7 +43,7 @@ static const char elem_test_str[] =
"<body>text test<!-- a comment -->"
"<a href=
\"
http://test
\"
name=
\"
x
\"
>link</a>"
"<input id=
\"
in
\"
class=
\"
testclass
\"
tabIndex=
\"
2
\"
/>"
"<select id=
\"
s
\"
><option id=
\"
x
\"
>opt1</option><option id=
\"
y
\"
>opt2</option></select>"
"<select id=
\"
s
\"
><option id=
\"
x
\"
value=
\"
val1
\"
>opt1</option><option id=
\"
y
\"
>opt2</option></select>"
"<textarea id=
\"
X
\"
>text text</textarea>"
"<table><tbody></tbody></table>"
"<script id=
\"
sc
\"
type=
\"
text/javascript
\"
></script>"
...
...
@@ -630,6 +630,32 @@ static void _test_select_put_selidx(unsigned line, IHTMLSelectElement *select, l
_test_select_selidx
(
line
,
select
,
index
);
}
#define test_select_value(s,v) _test_select_value(__LINE__,s,v)
static
void
_test_select_value
(
unsigned
line
,
IHTMLSelectElement
*
select
,
const
char
*
exval
)
{
BSTR
val
;
HRESULT
hres
;
hres
=
IHTMLSelectElement_get_value
(
select
,
&
val
);
ok_
(
__FILE__
,
line
)
(
hres
==
S_OK
,
"get_value failed: %08x
\n
"
,
hres
);
if
(
exval
)
ok_
(
__FILE__
,
line
)
(
!
strcmp_wa
(
val
,
exval
),
"unexpected value %s
\n
"
,
dbgstr_w
(
val
));
else
ok_
(
__FILE__
,
line
)
(
val
==
NULL
,
"val=%s, expected NULL
\n
"
,
dbgstr_w
(
val
));
}
#define test_select_set_value(s,v) _test_select_set_value(__LINE__,s,v)
static
void
_test_select_set_value
(
unsigned
line
,
IHTMLSelectElement
*
select
,
const
char
*
val
)
{
BSTR
bstr
;
HRESULT
hres
;
bstr
=
a2bstr
(
val
);
hres
=
IHTMLSelectElement_put_value
(
select
,
bstr
);
SysFreeString
(
bstr
);
ok_
(
__FILE__
,
line
)
(
hres
==
S_OK
,
"put_value failed: %08x
\n
"
,
hres
);
}
#define test_range_text(r,t) _test_range_text(__LINE__,r,t)
static
void
_test_range_text
(
unsigned
line
,
IHTMLTxtRange
*
range
,
const
char
*
extext
)
{
...
...
@@ -1301,6 +1327,9 @@ static void test_select_elem(IHTMLSelectElement *select)
test_select_length
(
select
,
2
);
test_select_selidx
(
select
,
0
);
test_select_put_selidx
(
select
,
1
);
test_select_set_value
(
select
,
"val1"
);
test_select_value
(
select
,
"val1"
);
}
static
void
test_create_option_elem
(
IHTMLDocument2
*
doc
)
...
...
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