https://git.reactos.org/?p=reactos.git;a=commitdiff;h=e68a367aa60f37faf49d6…
commit e68a367aa60f37faf49d6da301cf56ca4b46c912
Author: Amine Khaldi <amine.khaldi(a)reactos.org>
AuthorDate: Sat Mar 17 13:12:12 2018 +0100
Commit: Amine Khaldi <amine.khaldi(a)reactos.org>
CommitDate: Sat Mar 17 13:12:12 2018 +0100
[JSCRIPT_WINETEST] Sync with Wine Staging 3.3. CORE-14434
---
modules/rostests/winetests/jscript/activex.c | 14 +++-----------
modules/rostests/winetests/jscript/api.js | 3 +++
modules/rostests/winetests/jscript/caller.c | 9 +--------
modules/rostests/winetests/jscript/jscript.c | 11 +----------
modules/rostests/winetests/jscript/lang.js | 4 ++++
modules/rostests/winetests/jscript/run.c | 9 +--------
6 files changed, 13 insertions(+), 37 deletions(-)
diff --git a/modules/rostests/winetests/jscript/activex.c
b/modules/rostests/winetests/jscript/activex.c
index c9b822e6b3..636dd81e19 100644
--- a/modules/rostests/winetests/jscript/activex.c
+++ b/modules/rostests/winetests/jscript/activex.c
@@ -16,27 +16,19 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#define WIN32_NO_STATUS
-#define _INC_WINDOWS
-#define COM_NO_WINDOWS_H
-
#include <stdio.h>
#define COBJMACROS
#define CONST_VTABLE
-#include <windef.h>
-#include <winbase.h>
-#include <winreg.h>
-#include <winnls.h>
#include <ole2.h>
#include <dispex.h>
#include <activscp.h>
#include <objsafe.h>
-//#include <urlmon.h>
-//#include <mshtmhst.h>
+#include <urlmon.h>
+#include <mshtmhst.h>
-#include <wine/test.h>
+#include "wine/test.h"
#ifdef _WIN64
diff --git a/modules/rostests/winetests/jscript/api.js
b/modules/rostests/winetests/jscript/api.js
index 5a78b3a15a..4207f5a769 100644
--- a/modules/rostests/winetests/jscript/api.js
+++ b/modules/rostests/winetests/jscript/api.js
@@ -294,6 +294,7 @@ obj = new Date();
ok(!obj.hasOwnProperty('getTime'), "obj.hasOwnProperty('getTime') is
true");
ok(!Date.hasOwnProperty('getTime'), "Date.hasOwnProperty('getTime')
is true");
ok(Date.prototype.hasOwnProperty('getTime'),
"Date.prototype.hasOwnProperty('getTime') is false");
+ok(!("now" in Date), "now found in Date");
obj = new Number();
ok(!obj.hasOwnProperty('toFixed'), "obj.hasOwnProperty('toFixed') is
true");
@@ -908,6 +909,8 @@ arr = [,,,,,];
tmp = arr.pop();
ok(arr.length === 5, "arr.length = " + arr.length);
ok(tmp === undefined, "tmp = " + tmp);
+tmp = [1,2,,,].pop();
+ok(tmp === undefined, "tmp = " + tmp);
function PseudoArray() {
this[0] = 0;
diff --git a/modules/rostests/winetests/jscript/caller.c
b/modules/rostests/winetests/jscript/caller.c
index 1cbdb72e9f..f09ad90d71 100644
--- a/modules/rostests/winetests/jscript/caller.c
+++ b/modules/rostests/winetests/jscript/caller.c
@@ -16,24 +16,17 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#define WIN32_NO_STATUS
-#define _INC_WINDOWS
-#define COM_NO_WINDOWS_H
-
#include <stdio.h>
#define COBJMACROS
#define CONST_VTABLE
-#include <windef.h>
-#include <winbase.h>
-#include <winnls.h>
#include <ole2.h>
#include <dispex.h>
#include <activscp.h>
#include <objsafe.h>
-#include <wine/test.h>
+#include "wine/test.h"
#ifdef _WIN64
diff --git a/modules/rostests/winetests/jscript/jscript.c
b/modules/rostests/winetests/jscript/jscript.c
index 5f16dc461e..4c5aa6cc2f 100644
--- a/modules/rostests/winetests/jscript/jscript.c
+++ b/modules/rostests/winetests/jscript/jscript.c
@@ -16,25 +16,16 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#define WIN32_NO_STATUS
-#define _INC_WINDOWS
-#define COM_NO_WINDOWS_H
-
#define COBJMACROS
#define CONST_VTABLE
-#include <stdarg.h>
-
-#include <windef.h>
-#include <winbase.h>
-#include <winnls.h>
#include <initguid.h>
#include <ole2.h>
#include <activscp.h>
#include <objsafe.h>
#include <dispex.h>
-#include <wine/test.h>
+#include "wine/test.h"
#ifdef _WIN64
diff --git a/modules/rostests/winetests/jscript/lang.js
b/modules/rostests/winetests/jscript/lang.js
index aba6ddac6b..ef4c3165b1 100644
--- a/modules/rostests/winetests/jscript/lang.js
+++ b/modules/rostests/winetests/jscript/lang.js
@@ -1171,6 +1171,10 @@ ok(tmp["0"] === undefined, "tmp[0] is not
undefined");
ok(tmp["3"] === 2, "tmp[3] !== 2");
ok(tmp["6"] === true, "tmp[6] !== true");
ok(tmp[2] === 1, "tmp[2] !== 1");
+ok(!("0" in tmp), "0 found in array");
+ok(!("1" in tmp), "1 found in array");
+ok("2" in tmp, "2 not found in array");
+ok(!("2" in [1,,,,]), "2 found in [1,,,,]");
ok([1,].length === 2, "[1,].length !== 2");
ok([,,].length === 3, "[,,].length !== 3");
diff --git a/modules/rostests/winetests/jscript/run.c
b/modules/rostests/winetests/jscript/run.c
index 05fea3b111..887b264d8f 100644
--- a/modules/rostests/winetests/jscript/run.c
+++ b/modules/rostests/winetests/jscript/run.c
@@ -16,23 +16,16 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#define WIN32_NO_STATUS
-#define _INC_WINDOWS
-#define COM_NO_WINDOWS_H
-
#include <stdio.h>
#define COBJMACROS
#define CONST_VTABLE
-#include <windef.h>
-#include <winbase.h>
-#include <winnls.h>
#include <ole2.h>
#include <dispex.h>
#include <activscp.h>
-#include <wine/test.h>
+#include "wine/test.h"
#ifdef _WIN64