-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
LibWeb/Bindings: Define constructor properties in the correct order
- Loading branch information
1 parent
3261f87
commit 627b7dd
Showing
8 changed files
with
56 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 8 additions & 0 deletions
8
...eb/Text/expected/wpt-import/webidl/ecmascript-binding/builtin-function-properties.any.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
Harness status: OK | ||
|
||
Found 3 tests | ||
|
||
3 Pass | ||
Pass Constructor property enumeration order of "length", "name", and "prototype" | ||
Pass Method property enumeration order of "length" and "name" | ||
Pass Getter property enumeration order of "length" and "name" |
15 changes: 15 additions & 0 deletions
15
...bWeb/Text/input/wpt-import/webidl/ecmascript-binding/builtin-function-properties.any.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<!doctype html> | ||
<meta charset=utf-8> | ||
|
||
<script> | ||
self.GLOBAL = { | ||
isWindow: function() { return true; }, | ||
isWorker: function() { return false; }, | ||
isShadowRealm: function() { return false; }, | ||
}; | ||
</script> | ||
<script src="../../resources/testharness.js"></script> | ||
<script src="../../resources/testharnessreport.js"></script> | ||
|
||
<div id=log></div> | ||
<script src="../../webidl/ecmascript-binding/builtin-function-properties.any.js"></script> |
23 changes: 23 additions & 0 deletions
23
...LibWeb/Text/input/wpt-import/webidl/ecmascript-binding/builtin-function-properties.any.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
"use strict"; | ||
|
||
test(() => { | ||
const ownPropKeys = Reflect.ownKeys(Blob).slice(0, 3); | ||
assert_array_equals(ownPropKeys, ["length", "name", "prototype"]); | ||
}, 'Constructor property enumeration order of "length", "name", and "prototype"'); | ||
|
||
test(() => { | ||
assert_own_property(Blob.prototype, "slice"); | ||
|
||
const ownPropKeys = Reflect.ownKeys(Blob.prototype.slice).slice(0, 2); | ||
assert_array_equals(ownPropKeys, ["length", "name"]); | ||
}, 'Method property enumeration order of "length" and "name"'); | ||
|
||
test(() => { | ||
assert_own_property(Blob.prototype, "size"); | ||
|
||
const desc = Reflect.getOwnPropertyDescriptor(Blob.prototype, "size"); | ||
assert_equals(typeof desc.get, "function"); | ||
|
||
const ownPropKeys = Reflect.ownKeys(desc.get).slice(0, 2); | ||
assert_array_equals(ownPropKeys, ["length", "name"]); | ||
}, 'Getter property enumeration order of "length" and "name"'); |