| Index: LayoutTests/fast/js/structured-clone.html
|
| diff --git a/LayoutTests/fast/js/structured-clone.html b/LayoutTests/fast/js/structured-clone.html
|
| index 6cd9c365878d5340ae30ced8ce4297c7a39f3dde..7d5ae25011b17ab6a0e3439c91a949240edf6cb0 100644
|
| --- a/LayoutTests/fast/js/structured-clone.html
|
| +++ b/LayoutTests/fast/js/structured-clone.html
|
| @@ -119,4 +119,21 @@ promise_test(function() {
|
| });
|
| }, 'Verify: "Add a new property..." (dense arrays)');
|
|
|
| +promise_test(function() {
|
| + var orig = {
|
| + emptySet: new Set,
|
| + set: new Set([1, 2, 3]),
|
| + emptyMap: new Map,
|
| + map: new Map([[1, 2], [3, 4]])
|
| + };
|
| + return structuredClone(orig).then(function(clone) {
|
| + assert_true(clone.emptySet instanceof Set, 'Clone should be a Set');
|
| + assert_true(clone.emptyMap instanceof Map, 'Clone should be a Map');
|
| + assert_true(clone.set instanceof Set, 'Clone should be a Set');
|
| + assert_true(clone.map instanceof Map, 'Clone should be a Map');
|
| + assert_equals(clone.set.size, orig.set.size, 'Clone should be the same size');
|
| + assert_equals(clone.map.size, orig.map.size, 'Clone should be the same size');
|
| + });
|
| +}, 'Verify: "Maps and Sets are cloned..."');
|
| +
|
| </script>
|
|
|