mshtml: Implement IHTMLLocation::get_search.
This commit is contained in:
parent
4ebf01f681
commit
bbf8a4baf5
|
@ -462,12 +462,32 @@ static HRESULT WINAPI HTMLLocation_put_search(IHTMLLocation *iface, BSTR v)
|
|||
static HRESULT WINAPI HTMLLocation_get_search(IHTMLLocation *iface, BSTR *p)
|
||||
{
|
||||
HTMLLocation *This = HTMLLOCATION_THIS(iface);
|
||||
FIXME("(%p)->(%p)\n", This, p);
|
||||
URL_COMPONENTSW url = {sizeof(URL_COMPONENTSW)};
|
||||
HRESULT hres;
|
||||
const WCHAR hash[] = {'#',0};
|
||||
|
||||
TRACE("(%p)->(%p)\n", This, p);
|
||||
|
||||
if(!p)
|
||||
return E_POINTER;
|
||||
|
||||
return E_NOTIMPL;
|
||||
url.dwExtraInfoLength = 1;
|
||||
hres = get_url_components(This, &url);
|
||||
if(FAILED(hres))
|
||||
return hres;
|
||||
|
||||
if(!url.dwExtraInfoLength){
|
||||
*p = NULL;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
url.dwExtraInfoLength = strcspnW(url.lpszExtraInfo, hash);
|
||||
|
||||
*p = SysAllocStringLen(url.lpszExtraInfo, url.dwExtraInfoLength);
|
||||
|
||||
if(!*p)
|
||||
return E_OUTOFMEMORY;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI HTMLLocation_put_hash(IHTMLLocation *iface, BSTR v)
|
||||
|
|
|
@ -62,7 +62,7 @@ static const struct location_test http_test = {
|
|||
"www.winehq.org", TRUE,
|
||||
"80", TRUE,
|
||||
"", TRUE,
|
||||
"?search", FALSE,
|
||||
"?search", TRUE,
|
||||
"#hash", TRUE
|
||||
};
|
||||
|
||||
|
@ -76,7 +76,7 @@ static const struct location_test http_file_test = {
|
|||
"www.winehq.org", TRUE,
|
||||
"80", TRUE,
|
||||
"file", TRUE,
|
||||
"?search", FALSE,
|
||||
"?search", TRUE,
|
||||
"#hash", TRUE
|
||||
};
|
||||
|
||||
|
@ -90,7 +90,7 @@ static const struct location_test ftp_test = {
|
|||
"ftp.winehq.org", TRUE,
|
||||
"21", TRUE,
|
||||
"", TRUE,
|
||||
NULL, FALSE,
|
||||
NULL, TRUE,
|
||||
NULL, TRUE
|
||||
};
|
||||
|
||||
|
@ -104,7 +104,7 @@ static const struct location_test ftp_file_test = {
|
|||
"ftp.winehq.org", TRUE,
|
||||
"21", TRUE,
|
||||
"file", TRUE,
|
||||
NULL, FALSE,
|
||||
NULL, TRUE,
|
||||
NULL, TRUE
|
||||
};
|
||||
|
||||
|
@ -118,7 +118,7 @@ static const struct location_test file_test = {
|
|||
NULL, TRUE,
|
||||
"", TRUE,
|
||||
"C:\\windows\\win.ini", TRUE,
|
||||
NULL, FALSE,
|
||||
NULL, TRUE,
|
||||
NULL, TRUE
|
||||
};
|
||||
|
||||
|
@ -291,7 +291,7 @@ static void test_search(IHTMLLocation *loc, const struct location_test *test)
|
|||
test->name, E_POINTER, hres);
|
||||
|
||||
hres = IHTMLLocation_get_search(loc, &str);
|
||||
todo_wine ok(hres == S_OK, "%s: get_search failed: 0x%08x\n", test->name, hres);
|
||||
ok(hres == S_OK, "%s: get_search failed: 0x%08x\n", test->name, hres);
|
||||
if(hres == S_OK){
|
||||
if(test->search_ok)
|
||||
ok(str_eq_wa(str, test->search),
|
||||
|
|
Loading…
Reference in New Issue