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
4360ee4d
Commit
4360ee4d
authored
Jun 18, 2008
by
Jacek Caban
Committed by
Alexandre Julliard
Jun 19, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Added IHTMLInputElement::put_value implementation.
parent
b54a3a03
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
56 additions
and
2 deletions
+56
-2
htmlinput.c
dlls/mshtml/htmlinput.c
+12
-2
dom.c
dlls/mshtml/tests/dom.c
+44
-0
No files found.
dlls/mshtml/htmlinput.c
View file @
4360ee4d
...
...
@@ -137,8 +137,18 @@ static HRESULT WINAPI HTMLInputElement_get_type(IHTMLInputElement *iface, BSTR *
static
HRESULT
WINAPI
HTMLInputElement_put_value
(
IHTMLInputElement
*
iface
,
BSTR
v
)
{
HTMLInputElement
*
This
=
HTMLINPUT_THIS
(
iface
);
FIXME
(
"(%p)->(%s)
\n
"
,
This
,
debugstr_w
(
v
));
return
E_NOTIMPL
;
nsAString
val_str
;
nsresult
nsres
;
TRACE
(
"(%p)->(%s)
\n
"
,
This
,
debugstr_w
(
v
));
nsAString_Init
(
&
val_str
,
v
);
nsres
=
nsIDOMHTMLInputElement_SetValue
(
This
->
nsinput
,
&
val_str
);
nsAString_Finish
(
&
val_str
);
if
(
NS_FAILED
(
nsres
))
ERR
(
"SetValue failed: %08x
\n
"
,
nsres
);
return
S_OK
;
}
static
HRESULT
WINAPI
HTMLInputElement_get_value
(
IHTMLInputElement
*
iface
,
BSTR
*
p
)
...
...
dlls/mshtml/tests/dom.c
View file @
4360ee4d
...
...
@@ -843,6 +843,47 @@ static void _test_input_get_disabled(unsigned line, IHTMLInputElement *input, VA
ok_
(
__FILE__
,
line
)
(
disabled
==
exb
,
"disabled=%x, expected %x
\n
"
,
disabled
,
exb
);
}
#define test_input_value(o,t) _test_input_value(__LINE__,o,t)
static
void
_test_input_value
(
unsigned
line
,
IUnknown
*
unk
,
const
char
*
exval
)
{
IHTMLInputElement
*
input
;
BSTR
bstr
;
HRESULT
hres
;
hres
=
IUnknown_QueryInterface
(
unk
,
&
IID_IHTMLInputElement
,
(
void
**
)
&
input
);
ok_
(
__FILE__
,
line
)
(
hres
==
S_OK
,
"Could not get IHTMLInputElement: %08x
\n
"
,
hres
);
if
(
FAILED
(
hres
))
return
;
hres
=
IHTMLInputElement_get_value
(
input
,
&
bstr
);
ok_
(
__FILE__
,
line
)
(
hres
==
S_OK
,
"get_value failed: %08x
\n
"
,
hres
);
if
(
exval
)
ok_
(
__FILE__
,
line
)
(
!
strcmp_wa
(
bstr
,
exval
),
"value=%s
\n
"
,
dbgstr_w
(
bstr
));
else
ok_
(
__FILE__
,
line
)
(
!
exval
,
"exval != NULL
\n
"
);
SysFreeString
(
bstr
);
IHTMLInputElement_Release
(
input
);
}
#define test_input_put_value(o,v) _test_input_put_value(__LINE__,o,v)
static
void
_test_input_put_value
(
unsigned
line
,
IUnknown
*
unk
,
const
char
*
val
)
{
IHTMLInputElement
*
input
;
BSTR
bstr
;
HRESULT
hres
;
hres
=
IUnknown_QueryInterface
(
unk
,
&
IID_IHTMLInputElement
,
(
void
**
)
&
input
);
ok_
(
__FILE__
,
line
)
(
hres
==
S_OK
,
"Could not get IHTMLInputElement: %08x
\n
"
,
hres
);
if
(
FAILED
(
hres
))
return
;
bstr
=
a2bstr
(
val
);
hres
=
IHTMLInputElement_get_value
(
input
,
&
bstr
);
ok_
(
__FILE__
,
line
)
(
hres
==
S_OK
,
"get_value failed: %08x
\n
"
,
hres
);
SysFreeString
(
bstr
);
IHTMLInputElement_Release
(
input
);
}
#define get_child_nodes(u) _get_child_nodes(__LINE__,u)
static
IHTMLDOMChildrenCollection
*
_get_child_nodes
(
unsigned
line
,
IUnknown
*
unk
)
{
...
...
@@ -1735,6 +1776,9 @@ static void test_elems(IHTMLDocument2 *doc)
test_node_get_value_str
((
IUnknown
*
)
elem
,
NULL
);
test_node_put_value_str
((
IUnknown
*
)
elem
,
"test"
);
test_node_get_value_str
((
IUnknown
*
)
elem
,
NULL
);
test_input_value
((
IUnknown
*
)
elem
,
NULL
);
test_input_put_value
((
IUnknown
*
)
elem
,
"test"
);
test_input_value
((
IUnknown
*
)
elem
,
NULL
);
IHTMLInputElement_Release
(
input
);
IHTMLElement_Release
(
elem
);
...
...
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