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
e605d3e9
Commit
e605d3e9
authored
Sep 05, 2008
by
Alistair Leslie-Hughes
Committed by
Alexandre Julliard
Sep 08, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Add IHTMLBodyElement bgColor tests.
parent
4196f83f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
0 deletions
+31
-0
dom.c
dlls/mshtml/tests/dom.c
+31
-0
No files found.
dlls/mshtml/tests/dom.c
View file @
e605d3e9
...
...
@@ -2036,6 +2036,36 @@ static void test_default_body(IHTMLBodyElement *body)
ok
(
!
l
,
"scrollWidth = %ld
\n
"
,
l
);
}
static
void
test_body_funs
(
IHTMLBodyElement
*
body
)
{
static
WCHAR
sRed
[]
=
{
'r'
,
'e'
,
'd'
,
0
};
static
WCHAR
sRedbg
[]
=
{
'#'
,
'f'
,
'f'
,
'0'
,
'0'
,
'0'
,
'0'
,
0
};
VARIANT
vbg
;
VARIANT
vDefaultbg
;
HRESULT
hres
;
hres
=
IHTMLBodyElement_get_bgColor
(
body
,
&
vDefaultbg
);
ok
(
hres
==
S_OK
,
"get_background failed: %08x
\n
"
,
hres
);
ok
(
V_VT
(
&
vDefaultbg
)
==
VT_BSTR
,
"bstr != NULL
\n
"
);
V_VT
(
&
vbg
)
=
VT_BSTR
;
V_BSTR
(
&
vbg
)
=
SysAllocString
(
sRed
);
hres
=
IHTMLBodyElement_put_bgColor
(
body
,
vbg
);
ok
(
hres
==
S_OK
,
"get_background failed: %08x
\n
"
,
hres
);
VariantClear
(
&
vbg
);
hres
=
IHTMLBodyElement_get_bgColor
(
body
,
&
vbg
);
ok
(
hres
==
S_OK
,
"get_background failed: %08x
\n
"
,
hres
);
ok
(
V_VT
(
&
vDefaultbg
)
==
VT_BSTR
,
"V_VT(&vDefaultbg) != VT_BSTR
\n
"
);
ok
(
!
lstrcmpW
(
V_BSTR
(
&
vbg
),
sRedbg
),
"Unexpected type %s
\n
"
,
dbgstr_w
(
V_BSTR
(
&
vbg
)));
VariantClear
(
&
vbg
);
/* Restore Originial */
hres
=
IHTMLBodyElement_put_bgColor
(
body
,
vDefaultbg
);
ok
(
hres
==
S_OK
,
"get_background failed: %08x
\n
"
,
hres
);
VariantClear
(
&
vDefaultbg
);
}
static
void
test_window
(
IHTMLDocument2
*
doc
)
{
IHTMLWindow2
*
window
,
*
window2
,
*
self
;
...
...
@@ -2091,6 +2121,7 @@ static void test_defaults(IHTMLDocument2 *doc)
hres
=
IHTMLElement_QueryInterface
(
elem
,
&
IID_IHTMLBodyElement
,
(
void
**
)
&
body
);
ok
(
hres
==
S_OK
,
"Could not get IHTMBodyElement: %08x
\n
"
,
hres
);
test_default_body
(
body
);
test_body_funs
(
body
);
IHTMLBodyElement_Release
(
body
);
hres
=
IHTMLElement_get_style
(
elem
,
&
style
);
...
...
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