diff options
Diffstat (limited to 'test/built-ins/Object/getOwnPropertyNames/15.2.3.4-2-4.js')
-rw-r--r-- | test/built-ins/Object/getOwnPropertyNames/15.2.3.4-2-4.js | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/test/built-ins/Object/getOwnPropertyNames/15.2.3.4-2-4.js b/test/built-ins/Object/getOwnPropertyNames/15.2.3.4-2-4.js index 8401f8ad7..fd42435c7 100644 --- a/test/built-ins/Object/getOwnPropertyNames/15.2.3.4-2-4.js +++ b/test/built-ins/Object/getOwnPropertyNames/15.2.3.4-2-4.js @@ -6,23 +6,15 @@ es5id: 15.2.3.4-2-4 description: > Object.getOwnPropertyNames - returned array is the standard built-in constructor -includes: [runTestCase.js] ---*/ -function testcase() { var oldArray = Array; Array = function () { throw new Error("invoke customer defined Array!"); }; var obj = {}; - try { + var result = Object.getOwnPropertyNames(obj); - return Object.prototype.toString.call(result) === "[object Array]"; - } catch (ex) { - return false; - } finally { - Array = oldArray; - } - } -runTestCase(testcase); + +assert.sameValue(Object.prototype.toString.call(result), "[object Array]", 'Object.prototype.toString.call(result)'); |