| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 346 function TestKeyDelete(obj) { | 346 function TestKeyDelete(obj) { |
| 347 for (var i in symbols) { | 347 for (var i in symbols) { |
| 348 delete obj[symbols[i]] | 348 delete obj[symbols[i]] |
| 349 } | 349 } |
| 350 for (var i in symbols) { | 350 for (var i in symbols) { |
| 351 assertEquals(undefined, Object.getOwnPropertyDescriptor(obj, symbols[i])) | 351 assertEquals(undefined, Object.getOwnPropertyDescriptor(obj, symbols[i])) |
| 352 } | 352 } |
| 353 } | 353 } |
| 354 | 354 |
| 355 | 355 |
| 356 var objs = [{}, [], Object.create(null), Object(1), new Map, function(){}] | 356 var objs = [{}, [], Object.create({}), Object(1), new Map, function(){}] |
| 357 | 357 |
| 358 for (var i in objs) { | 358 for (var i in objs) { |
| 359 var obj = objs[i] | 359 var obj = objs[i] |
| 360 TestKeySet(obj) | 360 TestKeySet(obj) |
| 361 TestKeyDefine(obj) | 361 TestKeyDefine(obj) |
| 362 TestKeyGet(obj) | 362 TestKeyGet(obj) |
| 363 TestKeyHas(obj) | 363 TestKeyHas(obj) |
| 364 TestKeyEnum(obj) | 364 TestKeyEnum(obj) |
| 365 TestKeyNames(obj) | 365 TestKeyNames(obj) |
| 366 TestGetOwnPropertySymbols(obj) | 366 TestGetOwnPropertySymbols(obj) |
| (...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 559 assertEquals(JSON.stringify(input, null, "="), | 559 assertEquals(JSON.stringify(input, null, "="), |
| 560 JSON.stringify(input, (key, value) => value, "=")); | 560 JSON.stringify(input, (key, value) => value, "=")); |
| 561 } | 561 } |
| 562 | 562 |
| 563 TestStringify(undefined, Symbol("a")); | 563 TestStringify(undefined, Symbol("a")); |
| 564 TestStringify('[{}]', [Object(Symbol())]); | 564 TestStringify('[{}]', [Object(Symbol())]); |
| 565 var symbol_wrapper = Object(Symbol("a")) | 565 var symbol_wrapper = Object(Symbol("a")) |
| 566 TestStringify('{}', symbol_wrapper); | 566 TestStringify('{}', symbol_wrapper); |
| 567 symbol_wrapper.a = 1; | 567 symbol_wrapper.a = 1; |
| 568 TestStringify('{"a":1}', symbol_wrapper); | 568 TestStringify('{"a":1}', symbol_wrapper); |
| OLD | NEW |