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
adc5bcba
Commit
adc5bcba
authored
Aug 26, 2022
by
Gabriel Ivăncescu
Committed by
Alexandre Julliard
Aug 27, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Implement removeItem() for sessionStorage.
Signed-off-by:
Gabriel Ivăncescu
<
gabrielopcode@gmail.com
>
parent
1a5cddc1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
2 deletions
+25
-2
htmlstorage.c
dlls/mshtml/htmlstorage.c
+9
-2
misc.c
dlls/mshtml/tests/misc.c
+16
-0
No files found.
dlls/mshtml/htmlstorage.c
View file @
adc5bcba
...
...
@@ -642,13 +642,20 @@ done:
static
HRESULT
WINAPI
HTMLStorage_removeItem
(
IHTMLStorage
*
iface
,
BSTR
bstrKey
)
{
HTMLStorage
*
This
=
impl_from_IHTMLStorage
(
iface
);
struct
session_entry
*
session_entry
;
HRESULT
hres
;
TRACE
(
"(%p)->(%s)
\n
"
,
This
,
debugstr_w
(
bstrKey
));
if
(
!
This
->
filename
)
{
FIXME
(
"session storage not supported
\n
"
);
return
E_NOTIMPL
;
hres
=
get_session_entry
(
This
->
session_storage
,
bstrKey
,
FALSE
,
&
session_entry
);
if
(
SUCCEEDED
(
hres
)
&&
session_entry
)
{
This
->
session_storage
->
num_keys
--
;
wine_rb_remove
(
&
This
->
session_storage
->
data_map
,
&
session_entry
->
entry
);
SysFreeString
(
session_entry
->
value
);
heap_free
(
session_entry
);
}
return
hres
;
}
WaitForSingleObject
(
This
->
mutex
,
INFINITE
);
...
...
dlls/mshtml/tests/misc.c
View file @
adc5bcba
...
...
@@ -332,6 +332,9 @@ static void test_HTMLStorage(void)
SysFreeString
(
key
);
key
=
SysAllocString
(
L"undefined"
);
hres
=
IHTMLStorage_removeItem
(
storage
,
key
);
ok
(
hres
==
S_OK
,
"removeItem failed: %08lx
\n
"
,
hres
);
value
=
SysAllocString
(
L"null"
);
hres
=
IHTMLStorage_setItem
(
storage
,
key
,
value
);
ok
(
hres
==
S_OK
,
"setItem failed: %08lx
\n
"
,
hres
);
...
...
@@ -383,6 +386,11 @@ static void test_HTMLStorage(void)
ok
(
V_VT
(
&
var
)
==
VT_BSTR
,
"got %d
\n
"
,
V_VT
(
&
var
));
ok
(
!
wcscmp
(
V_BSTR
(
&
var
),
L""
),
"got %s
\n
"
,
wine_dbgstr_w
(
V_BSTR
(
&
var
)));
VariantClear
(
&
var
);
hres
=
IHTMLStorage_removeItem
(
storage
,
NULL
);
ok
(
hres
==
S_OK
,
"removeItem failed: %08lx
\n
"
,
hres
);
hres
=
IHTMLStorage_removeItem
(
storage2
,
key
);
ok
(
hres
==
S_OK
,
"removeItem failed: %08lx
\n
"
,
hres
);
SysFreeString
(
key
);
key
=
SysAllocString
(
L"aaaa"
);
...
...
@@ -397,6 +405,14 @@ static void test_HTMLStorage(void)
ok
(
V_VT
(
&
var
)
==
VT_BSTR
,
"got %d
\n
"
,
V_VT
(
&
var
));
ok
(
!
wcscmp
(
V_BSTR
(
&
var
),
L"bbbb"
),
"got %s
\n
"
,
wine_dbgstr_w
(
V_BSTR
(
&
var
)));
VariantClear
(
&
var
);
hres
=
IHTMLStorage_removeItem
(
storage2
,
key
);
ok
(
hres
==
S_OK
,
"removeItem failed: %08lx
\n
"
,
hres
);
V_VT
(
&
var
)
=
0xdead
;
hres
=
IHTMLStorage_getItem
(
storage
,
key
,
&
var
);
ok
(
hres
==
S_OK
,
"getItem failed: %08lx
\n
"
,
hres
);
ok
(
V_VT
(
&
var
)
==
VT_NULL
,
"got %d
\n
"
,
V_VT
(
&
var
));
SysFreeString
(
key
);
key
=
SysAllocString
(
L"foo"
);
...
...
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