https://git.reactos.org/?p=reactos.git;a=commitdiff;h=c6f0b6c95ed773cfd96b1…
commit c6f0b6c95ed773cfd96b1edb6c3b14140f68631e
Author: winesync <ros-dev(a)reactos.org>
AuthorDate: Sat Mar 12 15:14:51 2022 +0100
Commit: Mark Jansen <mark.jansen(a)reactos.org>
CommitDate: Sun Mar 20 19:27:50 2022 +0100
[WINESYNC] msi/tests: Test deferral of RegisterMimeInfo and UnregisterMimeInfo.
Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com>
Signed-off-by: Hans Leidekker <hans(a)codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard(a)winehq.org>
wine commit id f181e71400eb25a9aa4e1bf6355116269d04c0b7 by Zebediah Figura
<z.figura12(a)gmail.com>
---
modules/rostests/winetests/msi/action.c | 14 ++++++++++++++
modules/rostests/winetests/msi/custom.c | 24 ++++++++++++++++++++++++
modules/rostests/winetests/msi/custom.spec | 2 ++
3 files changed, 40 insertions(+)
diff --git a/modules/rostests/winetests/msi/action.c
b/modules/rostests/winetests/msi/action.c
index 91cf3e121c4..980ed508901 100644
--- a/modules/rostests/winetests/msi/action.c
+++ b/modules/rostests/winetests/msi/action.c
@@ -1716,13 +1716,26 @@ static const char rmi_install_exec_seq_dat[] =
"InstallFiles\t\t2000\n"
"UnregisterExtensionInfo\t\t3000\n"
"UnregisterMIMEInfo\t\t3500\n"
+ "umi_immediate\tREMOVE\t3501\n"
+ "umi_deferred\tREMOVE\t3502\n"
"RegisterExtensionInfo\t\t4000\n"
"RegisterMIMEInfo\t\t4500\n"
+ "rmi_immediate\tNOT REMOVE\t4501\n"
+ "rmi_deferred\tNOT REMOVE\t4502\n"
"RegisterProduct\t\t5000\n"
"PublishFeatures\t\t5100\n"
"PublishProduct\t\t5200\n"
"InstallFinalize\t\t6000\n";
+static const char rmi_custom_action_dat[] =
+ "Action\tType\tSource\tTarget\n"
+ "s72\ti2\tS64\tS0\n"
+ "CustomAction\tAction\n"
+ "rmi_immediate\t1\tcustom.dll\trmi_absent\n"
+ "rmi_deferred\t1025\tcustom.dll\trmi_present\n"
+ "umi_immediate\t1\tcustom.dll\trmi_present\n"
+ "umi_deferred\t1025\tcustom.dll\trmi_absent\n";
+
static const char pa_file_dat[] =
"File\tComponent_\tFileName\tFileSize\tVersion\tLanguage\tAttributes\tSequence\n"
"s72\ts72\tl255\ti4\tS72\tS20\tI2\ti2\n"
@@ -2270,6 +2283,7 @@ static const msi_table rmi_tables[] =
ADD_TABLE(rmi_verb),
ADD_TABLE(rmi_mime),
ADD_TABLE(rmi_install_exec_seq),
+ ADD_TABLE(rmi_custom_action),
ADD_TABLE(media),
ADD_TABLE(property)
};
diff --git a/modules/rostests/winetests/msi/custom.c
b/modules/rostests/winetests/msi/custom.c
index 306a8f3840f..b59b97a1dc7 100644
--- a/modules/rostests/winetests/msi/custom.c
+++ b/modules/rostests/winetests/msi/custom.c
@@ -1674,3 +1674,27 @@ todo_wine_if(!MsiGetMode(hinst, MSIRUNMODE_SCHEDULED)) {
return ERROR_SUCCESS;
}
+
+UINT WINAPI rmi_present(MSIHANDLE hinst)
+{
+ HKEY key;
+ LONG res;
+
+ res = RegOpenKeyA(HKEY_CLASSES_ROOT, "MIME\\Database\\Content
Type\\mime/type", &key);
+todo_wine_if(!MsiGetMode(hinst, MSIRUNMODE_SCHEDULED))
+ ok(hinst, !res, "got %u\n", res);
+
+ return ERROR_SUCCESS;
+}
+
+UINT WINAPI rmi_absent(MSIHANDLE hinst)
+{
+ HKEY key;
+ LONG res;
+
+ res = RegOpenKeyA(HKEY_CLASSES_ROOT, "MIME\\Database\\Content
Type\\mime/type", &key);
+todo_wine_if(!MsiGetMode(hinst, MSIRUNMODE_SCHEDULED))
+ ok(hinst, res == ERROR_FILE_NOT_FOUND, "got %u\n", res);
+
+ return ERROR_SUCCESS;
+}
diff --git a/modules/rostests/winetests/msi/custom.spec
b/modules/rostests/winetests/msi/custom.spec
index b28b3931ff4..7f05f018073 100644
--- a/modules/rostests/winetests/msi/custom.spec
+++ b/modules/rostests/winetests/msi/custom.spec
@@ -29,6 +29,8 @@
@ stdcall rci_absent(long)
@ stdcall rei_present(long)
@ stdcall rei_absent(long)
+@ stdcall rmi_present(long)
+@ stdcall rmi_absent(long)
@ stdcall rd_present(long)
@ stdcall rd_absent(long)
@ stdcall sds_present(long)