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
cb078982
Commit
cb078982
authored
Nov 07, 2022
by
Gabriel Ivăncescu
Committed by
Alexandre Julliard
Nov 07, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml/tests: Handle broken localStorage on native.
Signed-off-by:
Gabriel Ivăncescu
<
gabrielopcode@gmail.com
>
parent
8c0d3ae2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
6 deletions
+30
-6
events.c
dlls/mshtml/tests/events.c
+17
-3
misc.c
dlls/mshtml/tests/misc.c
+13
-3
No files found.
dlls/mshtml/tests/events.c
View file @
cb078982
...
@@ -4024,12 +4024,19 @@ static void test_storage_events(const char *doc_str)
...
@@ -4024,12 +4024,19 @@ static void test_storage_events(const char *doc_str)
ok
(
hres
==
S_OK
,
"Could not get IHTMLWindow6: %08lx
\n
"
,
hres
);
ok
(
hres
==
S_OK
,
"Could not get IHTMLWindow6: %08lx
\n
"
,
hres
);
IHTMLWindow2_Release
(
window
);
IHTMLWindow2_Release
(
window
);
hres
=
IHTMLWindow6_get_sessionStorage
(
window6
,
&
session_storage
[
i
]);
ok
(
hres
==
S_OK
,
"get_sessionStorage[%u] failed: %08lx
\n
"
,
i
,
hres
);
ok
(
session_storage
[
i
]
!=
NULL
,
"session_storage[%u] == NULL
\n
"
,
i
);
hres
=
IHTMLWindow6_get_localStorage
(
window6
,
&
local_storage
[
i
]);
hres
=
IHTMLWindow6_get_localStorage
(
window6
,
&
local_storage
[
i
]);
/* w10pro64 testbot VM sometimes returns this for some reason */
if
(
hres
==
WININET_E_INTERNAL_ERROR
)
{
win_skip
(
"localStorage is buggy and not available, skipping storage events tests
\n
"
);
goto
done
;
}
ok
(
hres
==
S_OK
,
"get_localStorage[%u] failed: %08lx
\n
"
,
i
,
hres
);
ok
(
hres
==
S_OK
,
"get_localStorage[%u] failed: %08lx
\n
"
,
i
,
hres
);
ok
(
local_storage
[
i
]
!=
NULL
,
"local_storage[%u] == NULL
\n
"
,
i
);
ok
(
local_storage
[
i
]
!=
NULL
,
"local_storage[%u] == NULL
\n
"
,
i
);
hres
=
IHTMLWindow6_get_sessionStorage
(
window6
,
&
session_storage
[
i
]);
ok
(
hres
==
S_OK
,
"get_sessionStorage[%u] failed: %08lx
\n
"
,
i
,
hres
);
ok
(
session_storage
[
i
]
!=
NULL
,
"session_storage[%u] == NULL
\n
"
,
i
);
hres
=
IHTMLDocument2_QueryInterface
(
doc
[
i
],
&
IID_IHTMLDocument6
,
(
void
**
)
&
doc6
);
hres
=
IHTMLDocument2_QueryInterface
(
doc
[
i
],
&
IID_IHTMLDocument6
,
(
void
**
)
&
doc6
);
if
(
SUCCEEDED
(
hres
))
{
if
(
SUCCEEDED
(
hres
))
{
...
@@ -4125,6 +4132,9 @@ static void test_storage_events(const char *doc_str)
...
@@ -4125,6 +4132,9 @@ static void test_storage_events(const char *doc_str)
pump_msgs
(
&
called_doc1_onstoragecommit
);
pump_msgs
(
&
called_doc1_onstoragecommit
);
CHECK_CALLED
(
doc1_onstoragecommit
);
CHECK_CALLED
(
doc1_onstoragecommit
);
for
(
i
=
0
;
i
<
ARRAY_SIZE
(
local_storage
);
i
++
)
IHTMLStorage_Release
(
local_storage
[
i
]);
/* session storage */
/* session storage */
key
=
SysAllocString
(
L"foobar"
);
key
=
SysAllocString
(
L"foobar"
);
hres
=
IHTMLStorage_removeItem
(
session_storage
[
0
],
key
);
hres
=
IHTMLStorage_removeItem
(
session_storage
[
0
],
key
);
...
@@ -4184,6 +4194,10 @@ static void test_storage_events(const char *doc_str)
...
@@ -4184,6 +4194,10 @@ static void test_storage_events(const char *doc_str)
CHECK_CALLED
(
doc1_onstorage
);
CHECK_CALLED
(
doc1_onstorage
);
if
(
document_mode
>=
9
)
CHECK_CALLED
(
window1_onstorage
);
if
(
document_mode
>=
9
)
CHECK_CALLED
(
window1_onstorage
);
for
(
i
=
0
;
i
<
ARRAY_SIZE
(
session_storage
);
i
++
)
IHTMLStorage_Release
(
session_storage
[
i
]);
done:
set_client_site
(
doc
[
0
],
FALSE
);
set_client_site
(
doc
[
0
],
FALSE
);
set_client_site
(
doc
[
1
],
FALSE
);
set_client_site
(
doc
[
1
],
FALSE
);
IHTMLDocument2_Release
(
doc
[
0
]);
IHTMLDocument2_Release
(
doc
[
0
]);
...
...
dlls/mshtml/tests/misc.c
View file @
cb078982
...
@@ -161,8 +161,14 @@ static HRESULT get_localstorage(IHTMLDocument2 *doc, IHTMLStorage **storage)
...
@@ -161,8 +161,14 @@ static HRESULT get_localstorage(IHTMLDocument2 *doc, IHTMLStorage **storage)
}
}
hres
=
IHTMLWindow6_get_localStorage
(
window6
,
storage
);
hres
=
IHTMLWindow6_get_localStorage
(
window6
,
storage
);
ok
(
hres
==
S_OK
,
"get_localStorage failed: %08lx
\n
"
,
hres
);
ok
(
*
storage
!=
NULL
,
"*storage == NULL
\n
"
);
/* w10pro64 testbot VM sometimes returns this for some reason */
if
(
hres
==
WININET_E_INTERNAL_ERROR
)
win_skip
(
"localStorage is buggy and not available, skipping tests
\n
"
);
else
{
ok
(
hres
==
S_OK
,
"get_localStorage failed: %08lx
\n
"
,
hres
);
ok
(
*
storage
!=
NULL
,
"*storage == NULL
\n
"
);
}
IHTMLWindow6_Release
(
window6
);
IHTMLWindow6_Release
(
window6
);
return
hres
;
return
hres
;
...
@@ -206,7 +212,11 @@ static void test_HTMLStorage(void)
...
@@ -206,7 +212,11 @@ static void test_HTMLStorage(void)
doc2
=
create_doc_from_url
(
L"http://www.codeweavers.com/"
);
doc2
=
create_doc_from_url
(
L"http://www.codeweavers.com/"
);
hres
=
get_localstorage
(
doc
,
&
storage
);
hres
=
get_localstorage
(
doc
,
&
storage
);
ok
(
hres
==
S_OK
,
"got %08lx
\n
"
,
hres
);
if
(
hres
!=
S_OK
)
{
IHTMLDocument2_Release
(
doc2
);
IHTMLDocument2_Release
(
doc
);
return
;
}
hres
=
get_localstorage
(
doc2
,
&
storage2
);
hres
=
get_localstorage
(
doc2
,
&
storage2
);
ok
(
hres
==
S_OK
,
"got %08lx
\n
"
,
hres
);
ok
(
hres
==
S_OK
,
"got %08lx
\n
"
,
hres
);
...
...
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