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
5b56d060
Commit
5b56d060
authored
Mar 29, 2012
by
Jacek Caban
Committed by
Alexandre Julliard
Mar 29, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Added IHTMLDocument2::get_domain implementation.
parent
f11ed78b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
9 deletions
+23
-9
htmldoc.c
dlls/mshtml/htmldoc.c
+11
-2
htmllocation.c
dlls/mshtml/tests/htmllocation.c
+12
-7
No files found.
dlls/mshtml/htmldoc.c
View file @
5b56d060
...
...
@@ -622,8 +622,17 @@ static HRESULT WINAPI HTMLDocument_put_domain(IHTMLDocument2 *iface, BSTR v)
static
HRESULT
WINAPI
HTMLDocument_get_domain
(
IHTMLDocument2
*
iface
,
BSTR
*
p
)
{
HTMLDocument
*
This
=
impl_from_IHTMLDocument2
(
iface
);
FIXME
(
"(%p)->(%p)
\n
"
,
This
,
p
);
return
E_NOTIMPL
;
HRESULT
hres
;
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
p
);
if
(
!
This
->
window
||
!
This
->
window
->
uri
)
{
FIXME
(
"No current URI
\n
"
);
return
E_FAIL
;
}
hres
=
IUri_GetHost
(
This
->
window
->
uri
,
p
);
return
FAILED
(
hres
)
?
hres
:
S_OK
;
}
static
HRESULT
WINAPI
HTMLDocument_put_cookie
(
IHTMLDocument2
*
iface
,
BSTR
v
)
...
...
dlls/mshtml/tests/htmllocation.c
View file @
5b56d060
...
...
@@ -105,11 +105,8 @@ static int str_eq_wa(LPCWSTR strw, const char *stra)
{
CHAR
buf
[
512
];
if
(
strw
==
NULL
||
stra
==
NULL
){
if
((
void
*
)
strw
==
(
void
*
)
stra
)
return
1
;
return
0
;
}
if
(
!
strw
||
!
stra
)
return
(
void
*
)
strw
==
(
void
*
)
stra
;
WideCharToMultiByte
(
CP_ACP
,
0
,
strw
,
-
1
,
buf
,
sizeof
(
buf
),
NULL
,
NULL
);
return
!
lstrcmpA
(
stra
,
buf
);
...
...
@@ -172,7 +169,7 @@ static void test_host(IHTMLLocation *loc, const struct location_test *test)
SysFreeString
(
str
);
}
static
void
test_hostname
(
IHTMLLocation
*
loc
,
const
struct
location_test
*
test
)
static
void
test_hostname
(
IHTMLLocation
*
loc
,
IHTMLDocument2
*
doc
,
const
struct
location_test
*
test
)
{
HRESULT
hres
;
BSTR
str
;
...
...
@@ -189,6 +186,14 @@ static void test_hostname(IHTMLLocation *loc, const struct location_test *test)
"%s: expected retrieved hostname to be L
\"
%s
\"
, was: %s
\n
"
,
test
->
name
,
test
->
hostname
,
wine_dbgstr_w
(
str
));
SysFreeString
(
str
);
hres
=
IHTMLDocument2_get_domain
(
doc
,
&
str
);
ok
(
hres
==
S_OK
,
"%s: get_domain failed: 0x%08x
\n
"
,
test
->
name
,
hres
);
if
(
hres
==
S_OK
)
ok
(
str_eq_wa
(
str
,
test
->
hostname
?
test
->
hostname
:
""
),
"%s: expected retrieved domain to be L
\"
%s
\"
, was: %s
\n
"
,
test
->
name
,
test
->
hostname
,
wine_dbgstr_w
(
str
));
SysFreeString
(
str
);
}
static
void
test_port
(
IHTMLLocation
*
loc
,
const
struct
location_test
*
test
)
...
...
@@ -345,7 +350,7 @@ static void perform_test(const struct location_test* test)
test_href
(
location
,
test
);
test_protocol
(
location
,
test
);
test_host
(
location
,
test
);
test_hostname
(
location
,
test
);
test_hostname
(
location
,
doc
,
test
);
test_port
(
location
,
test
);
test_pathname
(
location
,
test
);
test_search
(
location
,
test
);
...
...
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