Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
98cf6a6a
Commit
98cf6a6a
authored
Aug 21, 2019
by
Jacek Caban
Committed by
Alexandre Julliard
Aug 21, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml/tests: Add Object.defineProperties tests.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
e458e706
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
43 additions
and
0 deletions
+43
-0
es5.js
dlls/mshtml/tests/es5.js
+43
-0
No files found.
dlls/mshtml/tests/es5.js
View file @
98cf6a6a
...
...
@@ -507,6 +507,48 @@ function test_defineProperty() {
next_test
();
}
function
test_defineProperties
()
{
var
o
,
defined
,
descs
;
descs
=
{
acc_prop
:
{
get
:
function
()
{
return
1
;
}
},
prop
:
{
value
:
2
},
e
:
{
enumerable
:
true
}
};
o
=
new
Object
();
defined
=
Object
.
defineProperties
(
o
,
descs
);
ok
(
defined
===
o
,
"defined != o"
);
ok
(
o
.
acc_prop
===
1
,
"o.acc_prop = "
+
o
.
acc_prop
);
ok
(
o
.
prop
===
2
,
"o.prop = "
+
o
.
prop
);
ok
(
o
.
e
===
undefined
,
"o.e = "
+
o
.
e
);
ok
(
"e"
in
o
,
"e is not in o"
);
test_own_data_prop_desc
(
o
,
"prop"
,
false
,
false
,
false
);
test_own_data_prop_desc
(
o
,
"e"
,
false
,
true
,
false
);
for
(
var
p
in
o
)
ok
(
p
===
"e"
,
"p = "
+
p
);
o
=
new
Object
();
Object
.
defineProperties
(
o
,
1
);
for
(
var
p
in
o
)
ok
(
false
,
"o has property "
+
p
);
o
=
Object
.
create
(
null
,
descs
);
ok
(
o
.
acc_prop
===
1
,
"o.acc_prop = "
+
o
.
acc_prop
);
ok
(
o
.
prop
===
2
,
"o.prop = "
+
o
.
prop
);
ok
(
o
.
e
===
undefined
,
"o.e = "
+
o
.
e
);
ok
(
"e"
in
o
,
"e is not in o"
);
test_own_data_prop_desc
(
o
,
"prop"
,
false
,
false
,
false
);
test_own_data_prop_desc
(
o
,
"e"
,
false
,
true
,
false
);
for
(
var
p
in
o
)
ok
(
p
===
"e"
,
"p = "
+
p
);
var
desc_proto
=
new
Object
();
desc_proto
.
proto_prop
=
{
value
:
true
,
enumerable
:
true
};
descs
=
Object
.
create
(
desc_proto
);
o
=
Object
.
create
(
null
,
descs
);
ok
(
!
(
"proto_prop"
in
o
),
"proto_prop is in o"
);
next_test
();
}
function
test_property_definitions
()
{
var
obj
,
val
,
i
,
arr
;
...
...
@@ -811,6 +853,7 @@ var tests = [
test_identifier_keywords
,
test_getOwnPropertyDescriptor
,
test_defineProperty
,
test_defineProperties
,
test_property_definitions
,
test_string_trim
,
test_global_properties
,
...
...
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