Rebase against 1348d9e97b1e83c99b68e0c9b592798038dc7f41.

This commit is contained in:
Sebastian Lackner 2016-05-15 02:23:15 +02:00
parent 131c688ab3
commit 6f424b1e0f
28 changed files with 143 additions and 131 deletions

View File

@ -0,0 +1,49 @@
From 8f6390553dc5a0c32a4d6eb4fa73be0854acee37 Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Sun, 15 May 2016 02:13:18 +0200
Subject: dsound: Get rid of no longer needed mix_buffer_len field.
---
dlls/dsound/dsound_private.h | 2 +-
dlls/dsound/primary.c | 5 +----
2 files changed, 2 insertions(+), 5 deletions(-)
diff --git a/dlls/dsound/dsound_private.h b/dlls/dsound/dsound_private.h
index b980453..8bf9c9d 100644
--- a/dlls/dsound/dsound_private.h
+++ b/dlls/dsound/dsound_private.h
@@ -88,7 +88,7 @@ struct DirectSoundDevice
int num_speakers;
int lfe_channel;
float *tmp_buffer;
- DWORD tmp_buffer_len, mix_buffer_len;
+ DWORD tmp_buffer_len;
DSVOLUMEPAN volpan;
diff --git a/dlls/dsound/primary.c b/dlls/dsound/primary.c
index 1925d0c..a5fe039 100644
--- a/dlls/dsound/primary.c
+++ b/dlls/dsound/primary.c
@@ -338,8 +338,6 @@ HRESULT DSOUND_PrimaryOpen(DirectSoundDevice *device)
device->buflen = ds_hel_buflen;
device->buflen -= device->buflen % device->pwfx->nBlockAlign;
- device->mix_buffer_len = (device->buflen / (device->pwfx->wBitsPerSample / 8)) * sizeof(float);
-
if (device->state == STATE_PLAYING) device->state = STATE_STARTING;
else if (device->state == STATE_STOPPING) device->state = STATE_STOPPED;
@@ -359,8 +357,7 @@ HRESULT DSOUND_PrimaryOpen(DirectSoundDevice *device)
device->buffer = newbuf;
- TRACE("buflen: %u, fraglen: %u, mix_buffer_len: %u\n",
- device->buflen, device->fraglen, device->mix_buffer_len);
+ TRACE("buflen: %u, fraglen: %u\n", device->buflen, device->fraglen);
if(device->pwfx->wFormatTag == WAVE_FORMAT_IEEE_FLOAT ||
(device->pwfx->wFormatTag == WAVE_FORMAT_EXTENSIBLE &&
--
2.8.0

View File

@ -1,4 +1,4 @@
From dd8497b40ae145da74ca9aeb8aab274572328bbd Mon Sep 17 00:00:00 2001
From 31e4f44b8a215624ffc771f055ca1012f4c77841 Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Sat, 28 Mar 2015 08:18:10 +0100
Subject: dsound: Apply filters before sound is multiplied to speakers.
@ -11,34 +11,34 @@ Based on a patch by Mark Harmstone.
3 files changed, 77 insertions(+), 32 deletions(-)
diff --git a/dlls/dsound/dsound.c b/dlls/dsound/dsound.c
index 065c377..ed0bbba 100644
index cc3feb2..560c1f8 100644
--- a/dlls/dsound/dsound.c
+++ b/dlls/dsound/dsound.c
@@ -238,6 +238,7 @@ static ULONG DirectSoundDevice_Release(DirectSoundDevice * device)
@@ -237,6 +237,7 @@ static ULONG DirectSoundDevice_Release(DirectSoundDevice * device)
if(device->volume)
IAudioStreamVolume_Release(device->volume);
+ HeapFree(GetProcessHeap(), 0, device->dsp_buffer);
HeapFree(GetProcessHeap(), 0, device->tmp_buffer);
HeapFree(GetProcessHeap(), 0, device->mix_buffer);
HeapFree(GetProcessHeap(), 0, device->buffer);
RtlDeleteResource(&device->buffer_list_lock);
diff --git a/dlls/dsound/dsound_private.h b/dlls/dsound/dsound_private.h
index 726452c..ed645db 100644
index 6cfc33e..c6beaea 100644
--- a/dlls/dsound/dsound_private.h
+++ b/dlls/dsound/dsound_private.h
@@ -91,8 +91,8 @@ struct DirectSoundDevice
@@ -88,8 +88,8 @@ struct DirectSoundDevice
int speaker_num[DS_MAX_CHANNELS];
int num_speakers;
int lfe_channel;
- float *mix_buffer, *tmp_buffer;
- DWORD tmp_buffer_len, mix_buffer_len;
+ float *mix_buffer, *tmp_buffer, *dsp_buffer;
+ DWORD mix_buffer_len, tmp_buffer_len, dsp_buffer_len;
- float *tmp_buffer;
- DWORD tmp_buffer_len;
+ float *tmp_buffer, *dsp_buffer;
+ DWORD tmp_buffer_len, dsp_buffer_len;
DSVOLUMEPAN volpan;
diff --git a/dlls/dsound/mixer.c b/dlls/dsound/mixer.c
index 4f22f85..ff92cc1 100644
index c358385..9a6224e 100644
--- a/dlls/dsound/mixer.c
+++ b/dlls/dsound/mixer.c
@@ -266,23 +266,22 @@ static inline float get_current_sample(const IDirectSoundBufferImpl *dsb,
@ -225,5 +225,5 @@ index 4f22f85..ff92cc1 100644
static void DSOUND_MixerVol(const IDirectSoundBufferImpl *dsb, INT frames)
--
2.3.3
2.8.0

View File

@ -1,4 +1,4 @@
From b69c6b88a3628dcaf0f5520f2a33a47013c50aef Mon Sep 17 00:00:00 2001
From cdfc54a6363804cc8ee9146c3adbd51e431bcbf2 Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Sun, 5 Apr 2015 19:13:18 +0200
Subject: dsound: Allow disabling of EAX support in the registry.
@ -6,13 +6,13 @@ Subject: dsound: Allow disabling of EAX support in the registry.
Based on a patch by Mark Harmstone.
---
dlls/dsound/buffer.c | 16 ++++++----------
dlls/dsound/dsound_main.c | 10 ++++++++--
dlls/dsound/dsound_main.c | 9 ++++++++-
dlls/dsound/dsound_private.h | 2 ++
dlls/dsound/eax.c | 28 ++++++++++++++++++++++++++++
4 files changed, 44 insertions(+), 12 deletions(-)
4 files changed, 44 insertions(+), 11 deletions(-)
diff --git a/dlls/dsound/buffer.c b/dlls/dsound/buffer.c
index 3641e32..ca6a5b5 100644
index b763514..ca93972 100644
--- a/dlls/dsound/buffer.c
+++ b/dlls/dsound/buffer.c
@@ -35,6 +35,7 @@
@ -23,7 +23,7 @@ index 3641e32..ca6a5b5 100644
/*******************************************************************************
* IDirectSoundNotify
@@ -1331,16 +1332,11 @@ static HRESULT WINAPI IKsPropertySetImpl_QuerySupport(IKsPropertySet *iface, REF
@@ -1329,16 +1330,11 @@ static HRESULT WINAPI IKsPropertySetImpl_QuerySupport(IKsPropertySet *iface, REF
TRACE("(%p,%s,%d,%p)\n",This,debugstr_guid(guidPropSet),dwPropID,pTypeSupport);
@ -46,12 +46,12 @@ index 3641e32..ca6a5b5 100644
return E_PROP_ID_UNSUPPORTED;
diff --git a/dlls/dsound/dsound_main.c b/dlls/dsound/dsound_main.c
index 1f512a4..4b7e7b0 100644
index b349eb4..db2ca50 100644
--- a/dlls/dsound/dsound_main.c
+++ b/dlls/dsound/dsound_main.c
@@ -95,8 +95,12 @@ WCHAR wine_vxd_drv[] = { 'w','i','n','e','m','m','.','v','x','d', 0 };
@@ -94,8 +94,12 @@ WCHAR wine_vxd_drv[] = { 'w','i','n','e','m','m','.','v','x','d', 0 };
/* All default settings, you most likely don't want to touch these, see wiki on UsefulRegistryKeys */
int ds_hel_buflen = 32768 * 2;
int ds_snd_queue_max = 10;
int ds_hq_buffers_max = 4;
+BOOL ds_eax_enabled = FALSE;
static HINSTANCE instance;
@ -62,7 +62,7 @@ index 1f512a4..4b7e7b0 100644
/*
* Get a config key from either the app-specific or the default config
*/
@@ -109,7 +113,6 @@ static inline DWORD get_config_key( HKEY defkey, HKEY appkey, const char *name,
@@ -108,7 +112,6 @@ static inline DWORD get_config_key( HKEY defkey, HKEY appkey, const char *name,
return ERROR_FILE_NOT_FOUND;
}
@ -70,11 +70,7 @@ index 1f512a4..4b7e7b0 100644
/*
* Setup the dsound options.
*/
@@ -150,16 +153,19 @@ void setup_dsound_options(void)
if (!get_config_key( hkey, appkey, "SndQueueMax", buffer, MAX_PATH ))
ds_snd_queue_max = atoi(buffer);
-
@@ -149,11 +152,15 @@ void setup_dsound_options(void)
if (!get_config_key( hkey, appkey, "HQBuffersMax", buffer, MAX_PATH ))
ds_hq_buffers_max = atoi(buffer);
@ -85,25 +81,24 @@ index 1f512a4..4b7e7b0 100644
if (hkey) RegCloseKey( hkey );
TRACE("ds_hel_buflen = %d\n", ds_hel_buflen);
TRACE("ds_snd_queue_max = %d\n", ds_snd_queue_max);
TRACE("ds_hq_buffers_max = %d\n", ds_hq_buffers_max);
+ TRACE("ds_eax_enabled = %u\n", ds_eax_enabled);
}
static const char * get_device_id(LPCGUID pGuid)
diff --git a/dlls/dsound/dsound_private.h b/dlls/dsound/dsound_private.h
index a9987d0..5c21d1f 100644
index 5a986ba..4e928a4 100644
--- a/dlls/dsound/dsound_private.h
+++ b/dlls/dsound/dsound_private.h
@@ -38,6 +38,7 @@
@@ -37,6 +37,7 @@
extern int ds_hel_buflen DECLSPEC_HIDDEN;
extern int ds_snd_queue_max DECLSPEC_HIDDEN;
extern int ds_hq_buffers_max DECLSPEC_HIDDEN;
+extern BOOL ds_eax_enabled DECLSPEC_HIDDEN;
/*****************************************************************************
* Predeclare the interface implementation structures
@@ -234,6 +235,7 @@ LONG capped_refcount_dec(LONG *ref) DECLSPEC_HIDDEN;
@@ -230,6 +231,7 @@ LONG capped_refcount_dec(LONG *ref) DECLSPEC_HIDDEN;
HRESULT DSOUND_FullDuplexCreate(REFIID riid, void **ppv) DECLSPEC_HIDDEN;
/* eax.c */
@ -112,7 +107,7 @@ index a9987d0..5c21d1f 100644
ULONG dwPropID, void *pInstanceData, ULONG cbInstanceData, void *pPropData,
ULONG cbPropData, ULONG *pcbReturned) DECLSPEC_HIDDEN;
diff --git a/dlls/dsound/eax.c b/dlls/dsound/eax.c
index 4e98812..c9d5b6c 100644
index e10156e..857f924 100644
--- a/dlls/dsound/eax.c
+++ b/dlls/dsound/eax.c
@@ -809,6 +809,28 @@ void free_eax_buffer(IDirectSoundBufferImpl *dsb)
@ -165,5 +160,5 @@ index 4e98812..c9d5b6c 100644
buf->device->eax.using_eax = TRUE;
--
2.3.5
2.8.0

View File

@ -1,4 +1,4 @@
From 208155a225fef8613f9ef033ba0c895a4e71f409 Mon Sep 17 00:00:00 2001
From fe24cfe8b8e99c4e41fc9d147d7815bce37d2fa0 Mon Sep 17 00:00:00 2001
From: "Alexander E. Patrakov" <patrakov at gmail.com>
Date: Thu, 7 Aug 2014 17:15:00 -0600
Subject: dsound: Add a linear resampler for use with a large number of mixing
@ -11,20 +11,20 @@ Subject: dsound: Add a linear resampler for use with a large number of mixing
3 files changed, 51 insertions(+), 3 deletions(-)
diff --git a/dlls/dsound/dsound_main.c b/dlls/dsound/dsound_main.c
index cb46301..1f512a4 100644
index 112ce78..b349eb4 100644
--- a/dlls/dsound/dsound_main.c
+++ b/dlls/dsound/dsound_main.c
@@ -94,6 +94,7 @@ WCHAR wine_vxd_drv[] = { 'w','i','n','e','m','m','.','v','x','d', 0 };
@@ -93,6 +93,7 @@ WCHAR wine_vxd_drv[] = { 'w','i','n','e','m','m','.','v','x','d', 0 };
/* All default settings, you most likely don't want to touch these, see wiki on UsefulRegistryKeys */
int ds_hel_buflen = 32768 * 2;
int ds_snd_queue_max = 10;
+int ds_hq_buffers_max = 4;
static HINSTANCE instance;
/*
@@ -150,11 +151,15 @@ void setup_dsound_options(void)
ds_snd_queue_max = atoi(buffer);
@@ -145,10 +146,14 @@ void setup_dsound_options(void)
if (!get_config_key( hkey, appkey, "HelBuflen", buffer, MAX_PATH ))
ds_hel_buflen = atoi(buffer);
+ if (!get_config_key( hkey, appkey, "HQBuffersMax", buffer, MAX_PATH ))
+ ds_hq_buffers_max = atoi(buffer);
@ -33,25 +33,24 @@ index cb46301..1f512a4 100644
if (hkey) RegCloseKey( hkey );
TRACE("ds_hel_buflen = %d\n", ds_hel_buflen);
TRACE("ds_snd_queue_max = %d\n", ds_snd_queue_max);
+ TRACE("ds_hq_buffers_max = %d\n", ds_hq_buffers_max);
}
static const char * get_device_id(LPCGUID pGuid)
diff --git a/dlls/dsound/dsound_private.h b/dlls/dsound/dsound_private.h
index 9c001ed..726452c 100644
index b980453..b6bce1d 100644
--- a/dlls/dsound/dsound_private.h
+++ b/dlls/dsound/dsound_private.h
@@ -36,6 +36,7 @@
@@ -35,6 +35,7 @@
#define DS_MAX_CHANNELS 6
extern int ds_hel_buflen DECLSPEC_HIDDEN;
extern int ds_snd_queue_max DECLSPEC_HIDDEN;
+extern int ds_hq_buffers_max DECLSPEC_HIDDEN;
/*****************************************************************************
* Predeclare the interface implementation structures
diff --git a/dlls/dsound/mixer.c b/dlls/dsound/mixer.c
index 85ab14a..4f22f85 100644
index dec8ffd..c358385 100644
--- a/dlls/dsound/mixer.c
+++ b/dlls/dsound/mixer.c
@@ -278,7 +278,47 @@ static UINT cp_fields_noresample(IDirectSoundBufferImpl *dsb, UINT count)
@ -118,5 +117,5 @@ index 85ab14a..4f22f85 100644
ipos = dsb->sec_mixpos + adv * dsb->pwfx->nBlockAlign;
if (ipos >= dsb->buflen) {
--
2.3.3
2.8.0

View File

@ -51,7 +51,7 @@ usage()
# Get the upstream commit sha
upstream_commit()
{
echo "e1970c8547aa7fed5a097faf172eadc282b3394e"
echo "1348d9e97b1e83c99b68e0c9b592798038dc7f41"
}
# Show version information
@ -3378,31 +3378,33 @@ fi
# |
# | Modified files:
# | * dlls/dsound/Makefile.in, dlls/dsound/buffer.c, dlls/dsound/dsound.c, dlls/dsound/dsound_eax.h,
# | dlls/dsound/dsound_main.c, dlls/dsound/dsound_private.h, dlls/dsound/eax.c, dlls/dsound/mixer.c
# | dlls/dsound/dsound_main.c, dlls/dsound/dsound_private.h, dlls/dsound/eax.c, dlls/dsound/mixer.c, dlls/dsound/primary.c
# |
if test "$enable_dsound_EAX" -eq 1; then
patch_apply dsound-EAX/0001-dsound-Apply-filters-before-sound-is-multiplied-to-s.patch
patch_apply dsound-EAX/0002-dsound-Add-EAX-v1-constants-and-structs.patch
patch_apply dsound-EAX/0003-dsound-Report-that-we-support-EAX-v1.patch
patch_apply dsound-EAX/0004-dsound-Add-EAX-propset-stubs.patch
patch_apply dsound-EAX/0005-dsound-Add-EAX-presets.patch
patch_apply dsound-EAX/0006-dsound-Support-getting-and-setting-EAX-properties.patch
patch_apply dsound-EAX/0007-dsound-Support-getting-and-setting-EAX-buffer-proper.patch
patch_apply dsound-EAX/0008-dsound-Add-EAX-init-and-free-stubs.patch
patch_apply dsound-EAX/0009-dsound-Feed-data-through-EAX-function.patch
patch_apply dsound-EAX/0010-dsound-Allocate-EAX-delay-lines.patch
patch_apply dsound-EAX/0011-dsound-Add-EAX-VerbPass-stub.patch
patch_apply dsound-EAX/0012-dsound-Implement-EAX-lowpass-filter.patch
patch_apply dsound-EAX/0013-dsound-Add-delay-line-EAX-functions.patch
patch_apply dsound-EAX/0014-dsound-Implement-EAX-early-reflections.patch
patch_apply dsound-EAX/0015-dsound-Implement-EAX-decorrelator.patch
patch_apply dsound-EAX/0016-dsound-Implement-EAX-late-reverb.patch
patch_apply dsound-EAX/0017-dsound-Implement-EAX-late-all-pass-filter.patch
patch_apply dsound-EAX/0018-dsound-Various-improvements-to-EAX-support.patch
patch_apply dsound-EAX/0019-dsound-Allow-disabling-of-EAX-support-in-the-registr.patch
patch_apply dsound-EAX/0020-dsound-Add-stub-support-for-DSPROPSETID_EAX20_Listen.patch
patch_apply dsound-EAX/0021-dsound-Add-stub-support-for-DSPROPSETID_EAX20_Buffer.patch
patch_apply dsound-EAX/0001-dsound-Get-rid-of-no-longer-needed-mix_buffer_len-fi.patch
patch_apply dsound-EAX/0002-dsound-Apply-filters-before-sound-is-multiplied-to-s.patch
patch_apply dsound-EAX/0003-dsound-Add-EAX-v1-constants-and-structs.patch
patch_apply dsound-EAX/0004-dsound-Report-that-we-support-EAX-v1.patch
patch_apply dsound-EAX/0005-dsound-Add-EAX-propset-stubs.patch
patch_apply dsound-EAX/0006-dsound-Add-EAX-presets.patch
patch_apply dsound-EAX/0007-dsound-Support-getting-and-setting-EAX-properties.patch
patch_apply dsound-EAX/0008-dsound-Support-getting-and-setting-EAX-buffer-proper.patch
patch_apply dsound-EAX/0009-dsound-Add-EAX-init-and-free-stubs.patch
patch_apply dsound-EAX/0010-dsound-Feed-data-through-EAX-function.patch
patch_apply dsound-EAX/0011-dsound-Allocate-EAX-delay-lines.patch
patch_apply dsound-EAX/0012-dsound-Add-EAX-VerbPass-stub.patch
patch_apply dsound-EAX/0013-dsound-Implement-EAX-lowpass-filter.patch
patch_apply dsound-EAX/0014-dsound-Add-delay-line-EAX-functions.patch
patch_apply dsound-EAX/0015-dsound-Implement-EAX-early-reflections.patch
patch_apply dsound-EAX/0016-dsound-Implement-EAX-decorrelator.patch
patch_apply dsound-EAX/0017-dsound-Implement-EAX-late-reverb.patch
patch_apply dsound-EAX/0018-dsound-Implement-EAX-late-all-pass-filter.patch
patch_apply dsound-EAX/0019-dsound-Various-improvements-to-EAX-support.patch
patch_apply dsound-EAX/0020-dsound-Allow-disabling-of-EAX-support-in-the-registr.patch
patch_apply dsound-EAX/0021-dsound-Add-stub-support-for-DSPROPSETID_EAX20_Listen.patch
patch_apply dsound-EAX/0022-dsound-Add-stub-support-for-DSPROPSETID_EAX20_Buffer.patch
(
echo '+ { "Sebastian Lackner", "dsound: Get rid of no longer needed mix_buffer_len field.", 1 },';
echo '+ { "Sebastian Lackner", "dsound: Apply filters before sound is multiplied to speakers.", 1 },';
echo '+ { "Mark Harmstone", "dsound: Add EAX v1 constants and structs.", 1 },';
echo '+ { "Mark Harmstone", "dsound: Report that we support EAX.", 1 },';

View File

@ -1,19 +1,19 @@
From 2113716e5a404208e978343c5a6cf7bf3cf5bda2 Mon Sep 17 00:00:00 2001
From 83e88ace41be8d8971bc7efbdb8e9969257729e6 Mon Sep 17 00:00:00 2001
From: Dmitry Timoshkov <dmitry@baikal.ru>
Date: Fri, 13 May 2016 16:05:13 +0800
Subject: riched20/tests: Add a test to see what richedit class flavours should
be available.
---
dlls/riched20/tests/editor.c | 32 ++++++++++++++++++++++++++++++++
1 file changed, 32 insertions(+)
dlls/riched20/tests/editor.c | 33 +++++++++++++++++++++++++++++++++
1 file changed, 33 insertions(+)
diff --git a/dlls/riched20/tests/editor.c b/dlls/riched20/tests/editor.c
index ae9c0a5..ef44401 100644
index 31d5128..cdde40e 100644
--- a/dlls/riched20/tests/editor.c
+++ b/dlls/riched20/tests/editor.c
@@ -8337,6 +8337,37 @@ static void test_rtf_specials(void)
DestroyWindow( edit );
@@ -8349,6 +8349,38 @@ static void test_background(void)
DestroyWindow(hwndRichEdit);
}
+static void test_window_classes(void)
@ -47,10 +47,11 @@ index ae9c0a5..ef44401 100644
+ DestroyWindow(hwnd);
+ }
+}
+
START_TEST( editor )
{
@@ -8347,6 +8378,7 @@ START_TEST( editor )
BOOL ret;
@@ -8358,6 +8390,7 @@ START_TEST( editor )
ok(hmoduleRichEdit != NULL, "error: %d\n", (int) GetLastError());
is_lang_japanese = (PRIMARYLANGID(GetUserDefaultLangID()) == LANG_JAPANESE);

View File

@ -1,4 +1,4 @@
From ad5209b79d6309cde4a10a6bfab6dcd3e0af518d Mon Sep 17 00:00:00 2001
From b2525450e258182b0cb426d392f1677cc7971ae4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Fri, 15 May 2015 21:18:37 +0200
Subject: wininet/tests: Test auth credential reusage with host override.
@ -8,10 +8,10 @@ Subject: wininet/tests: Test auth credential reusage with host override.
1 file changed, 92 insertions(+)
diff --git a/dlls/wininet/tests/http.c b/dlls/wininet/tests/http.c
index 64f4647..c882fc1 100644
index 661dcc3..546e473 100644
--- a/dlls/wininet/tests/http.c
+++ b/dlls/wininet/tests/http.c
@@ -2408,6 +2408,20 @@ static DWORD CALLBACK server_thread(LPVOID param)
@@ -2413,6 +2413,20 @@ static DWORD CALLBACK server_thread(LPVOID param)
SetEvent(server_req_rec_event);
WaitForSingleObject(conn_wait_event, INFINITE);
}
@ -32,7 +32,7 @@ index 64f4647..c882fc1 100644
shutdown(c, 2);
closesocket(c);
c = -1;
@@ -3119,6 +3133,84 @@ static void test_header_override(int port)
@@ -3118,6 +3132,84 @@ static void test_header_override(int port)
InternetCloseHandle(req);
InternetCloseHandle(con);
InternetCloseHandle(ses);
@ -116,7 +116,7 @@ index 64f4647..c882fc1 100644
+ InternetCloseHandle(ses);
}
static void test_http1_1(int port)
static void test_connection_closing(int port)
--
2.8.0

View File

@ -1,17 +1,17 @@
From 6f8e73f6f05924035dcb731332298cc224ab8f20 Mon Sep 17 00:00:00 2001
From 21ca3efb2a8a1f505f9e3f3ed2126a766d4a127f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Fri, 15 May 2015 23:09:20 +0200
Subject: wininet/tests: Check cookie behaviour when overriding host.
---
dlls/wininet/tests/http.c | 99 ++++++++++++++++++++++++++++++++++++++++++++++-
1 file changed, 98 insertions(+), 1 deletion(-)
dlls/wininet/tests/http.c | 95 +++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 95 insertions(+)
diff --git a/dlls/wininet/tests/http.c b/dlls/wininet/tests/http.c
index 58eb5cc..6d1d48f 100644
index 546e473..0121aa5 100644
--- a/dlls/wininet/tests/http.c
+++ b/dlls/wininet/tests/http.c
@@ -1998,6 +1998,14 @@ static const char okmsg_cookie_path[] =
@@ -2000,6 +2000,14 @@ static const char okmsg_cookie_path[] =
"Set-Cookie: subcookie2=data; path=/test_cookie_set_path\r\n"
"\r\n";
@ -26,7 +26,7 @@ index 58eb5cc..6d1d48f 100644
static const char notokmsg[] =
"HTTP/1.1 400 Bad Request\r\n"
"Server: winetest\r\n"
@@ -2387,6 +2395,25 @@ static DWORD CALLBACK server_thread(LPVOID param)
@@ -2391,6 +2399,25 @@ static DWORD CALLBACK server_thread(LPVOID param)
else
send(c, notokmsg, sizeof notokmsg-1, 0);
}
@ -52,8 +52,8 @@ index 58eb5cc..6d1d48f 100644
if (strstr(buffer, "/test_host_override"))
{
if (strstr(buffer, host_header_override))
@@ -3098,6 +3125,74 @@ static void test_header_override(int port)
test_status_code_todo(req, 400);
@@ -3130,6 +3157,74 @@ static void test_header_override(int port)
}
InternetCloseHandle(req);
+ InternetSetCookieA("http://localhost", "cookie", "biscuit");
@ -127,18 +127,6 @@ index 58eb5cc..6d1d48f 100644
InternetCloseHandle(con);
InternetCloseHandle(ses);
@@ -4545,8 +4640,10 @@ static void test_request_content_length(int port)
con = InternetConnectA(ses, "localhost", port, NULL, NULL, INTERNET_SERVICE_HTTP, 0, 0);
ok(con != NULL, "InternetConnect failed\n");
+ /* On XP there is a weird bug that the following tests fail if certain cookies
+ * are set. We workaround this problem by passing INTERNET_FLAG_NO_COOKIES as flag. */
req = HttpOpenRequestA(con, "POST", "/test_request_content_length", NULL, NULL, NULL,
- INTERNET_FLAG_KEEP_CONNECTION, 0);
+ INTERNET_FLAG_KEEP_CONNECTION | INTERNET_FLAG_NO_COOKIES, 0);
ok(req != NULL, "HttpOpenRequest failed\n");
ret = HttpSendRequestA(req, NULL, 0, NULL, 0);
--
2.4.3
2.8.0

View File

@ -1,4 +1,4 @@
From 91c7ab52a873c9c6443443937bad998f5dc40bbd Mon Sep 17 00:00:00 2001
From 0b022db2f23f61313004bdf0e2e42e9fd9b2f81d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Sat, 16 May 2015 03:16:15 +0200
Subject: wininet: Replacing header fields should fail if they do not exist
@ -8,15 +8,14 @@ A lot of details are not properly covered by tests yet and were
marked with FIXME comments. The implementation was written in such
a way that it behaves identical to the old code in such situations.
---
dlls/wininet/http.c | 185 +++++++++++++++++++++++-----------------------
dlls/wininet/tests/http.c | 6 +-
2 files changed, 96 insertions(+), 95 deletions(-)
dlls/wininet/http.c | 185 ++++++++++++++++++++++++++--------------------------
1 file changed, 93 insertions(+), 92 deletions(-)
diff --git a/dlls/wininet/http.c b/dlls/wininet/http.c
index f7c8f76..85bc392 100644
index 6f01244..5419786 100644
--- a/dlls/wininet/http.c
+++ b/dlls/wininet/http.c
@@ -6115,127 +6115,128 @@ static LPWSTR * HTTP_InterpretHttpHeader(LPCWSTR buffer)
@@ -6166,127 +6166,128 @@ static LPWSTR * HTTP_InterpretHttpHeader(LPCWSTR buffer)
static DWORD HTTP_ProcessHeader(http_request_t *request, LPCWSTR field, LPCWSTR value, DWORD dwModifier)
{
@ -237,27 +236,6 @@ index f7c8f76..85bc392 100644
TRACE("<-- %d\n", res);
LeaveCriticalSection( &request->headers_section );
return res;
diff --git a/dlls/wininet/tests/http.c b/dlls/wininet/tests/http.c
index ff76e9f..8b5cdb7 100644
--- a/dlls/wininet/tests/http.c
+++ b/dlls/wininet/tests/http.c
@@ -3116,13 +3116,13 @@ static void test_header_override(int port)
ret = HttpAddRequestHeadersA(req, host_header_override, ~0u, HTTP_ADDREQ_FLAG_REPLACE);
err = GetLastError();
- todo_wine ok(!ret, "HttpAddRequestHeaders succeeded\n");
- todo_wine ok(err == ERROR_HTTP_HEADER_NOT_FOUND, "Expected error ERROR_HTTP_HEADER_NOT_FOUND, got %d\n", err);
+ ok(!ret, "HttpAddRequestHeaders succeeded\n");
+ ok(err == ERROR_HTTP_HEADER_NOT_FOUND, "Expected error ERROR_HTTP_HEADER_NOT_FOUND, got %d\n", err);
ret = HttpSendRequestA(req, NULL, 0, NULL, 0);
ok(ret, "HttpSendRequest failed\n");
- test_status_code_todo(req, 400);
+ test_status_code(req, 400);
InternetCloseHandle(req);
InternetSetCookieA("http://localhost", "cookie", "biscuit");
--
2.4.3
2.8.0