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
170b2da2
Commit
170b2da2
authored
Dec 27, 2009
by
Jacek Caban
Committed by
Alexandre Julliard
Dec 28, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Added better default bgColor test and code clean up.
parent
90a4eb7d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
11 deletions
+7
-11
dom.c
dlls/mshtml/tests/dom.c
+7
-11
No files found.
dlls/mshtml/tests/dom.c
View file @
170b2da2
...
...
@@ -4792,8 +4792,6 @@ static void test_default_body(IHTMLBodyElement *body)
BSTR
bstr
;
HRESULT
hres
;
VARIANT
v
;
WCHAR
sBodyText
[]
=
{
'#'
,
'F'
,
'F'
,
'0'
,
'0'
,
'0'
,
'0'
,
0
};
WCHAR
sTextInvalid
[]
=
{
'I'
,
'n'
,
'v'
,
'a'
,
'l'
,
'i'
,
'd'
,
0
};
bstr
=
(
void
*
)
0xdeadbeef
;
hres
=
IHTMLBodyElement_get_background
(
body
,
&
bstr
);
...
...
@@ -4814,10 +4812,9 @@ static void test_default_body(IHTMLBodyElement *body)
ok
(
V_VT
(
&
v
)
==
VT_BSTR
,
"Expected VT_BSTR got %d
\n
"
,
V_VT
(
&
v
));
ok
(
bstr
==
NULL
,
"bstr != NULL
\n
"
);
/* get_text - Invalid Text */
V_VT
(
&
v
)
=
VT_BSTR
;
V_BSTR
(
&
v
)
=
SysAllocString
(
sTextInvalid
);
V_BSTR
(
&
v
)
=
a2bstr
(
"Invalid"
);
hres
=
IHTMLBodyElement_put_text
(
body
,
v
);
ok
(
hres
==
S_OK
,
"expect S_OK got 0x%08d
\n
"
,
hres
);
VariantClear
(
&
v
);
...
...
@@ -4826,12 +4823,12 @@ static void test_default_body(IHTMLBodyElement *body)
hres
=
IHTMLBodyElement_get_text
(
body
,
&
v
);
ok
(
hres
==
S_OK
,
"expect S_OK got 0x%08d
\n
"
,
hres
);
ok
(
V_VT
(
&
v
)
==
VT_BSTR
,
"Expected VT_BSTR got %d
\n
"
,
V_VT
(
&
v
));
ok
(
!
strcmp_wa
(
V_BSTR
(
&
v
),
"#00a0d0"
),
"v
!= '#00a0d0'
\n
"
);
ok
(
!
strcmp_wa
(
V_BSTR
(
&
v
),
"#00a0d0"
),
"v
= %s, expected '#00a0d0'
\n
"
,
wine_dbgstr_w
(
V_BSTR
(
&
v
))
);
VariantClear
(
&
v
);
/* get_text - Valid Text */
V_VT
(
&
v
)
=
VT_BSTR
;
V_BSTR
(
&
v
)
=
SysAllocString
(
sBodyText
);
V_BSTR
(
&
v
)
=
a2bstr
(
"#FF0000"
);
hres
=
IHTMLBodyElement_put_text
(
body
,
v
);
ok
(
hres
==
S_OK
,
"expect S_OK got 0x%08d
\n
"
,
hres
);
VariantClear
(
&
v
);
...
...
@@ -4840,23 +4837,22 @@ static void test_default_body(IHTMLBodyElement *body)
hres
=
IHTMLBodyElement_get_text
(
body
,
&
v
);
ok
(
hres
==
S_OK
,
"expect S_OK got 0x%08d
\n
"
,
hres
);
ok
(
V_VT
(
&
v
)
==
VT_BSTR
,
"Expected VT_BSTR got %d
\n
"
,
V_VT
(
&
v
));
ok
(
!
strcmp_wa
(
V_BSTR
(
&
v
),
"#ff0000"
),
"v
!= '#ff0000'
\n
"
);
ok
(
!
strcmp_wa
(
V_BSTR
(
&
v
),
"#ff0000"
),
"v
= %s, expected '#ff0000'
\n
"
,
wine_dbgstr_w
(
V_BSTR
(
&
v
))
);
VariantClear
(
&
v
);
}
static
void
test_body_funs
(
IHTMLBodyElement
*
body
)
{
static
WCHAR
sRed
[]
=
{
'r'
,
'e'
,
'd'
,
0
};
VARIANT
vbg
;
VARIANT
vDefaultbg
;
VARIANT
vbg
,
vDefaultbg
;
HRESULT
hres
;
hres
=
IHTMLBodyElement_get_bgColor
(
body
,
&
vDefaultbg
);
ok
(
hres
==
S_OK
,
"get_bgColor failed: %08x
\n
"
,
hres
);
ok
(
V_VT
(
&
vDefaultbg
)
==
VT_BSTR
,
"bstr != NULL
\n
"
);
ok
(
!
V_BSTR
(
&
vDefaultbg
),
"V_BSTR(bgColor) = %s
\n
"
,
wine_dbgstr_w
(
V_BSTR
(
&
vDefaultbg
)));
V_VT
(
&
vbg
)
=
VT_BSTR
;
V_BSTR
(
&
vbg
)
=
SysAllocString
(
sRed
);
V_BSTR
(
&
vbg
)
=
a2bstr
(
"red"
);
hres
=
IHTMLBodyElement_put_bgColor
(
body
,
vbg
);
ok
(
hres
==
S_OK
,
"put_bgColor failed: %08x
\n
"
,
hres
);
VariantClear
(
&
vbg
);
...
...
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