Index: test/mjsunit/object-get-own-property-names.js |
diff --git a/test/mjsunit/object-get-own-property-names.js b/test/mjsunit/object-get-own-property-names.js |
index 64607c6b94a2713394207e569457bc6efa4b7b9d..aee6585680b8767d40963e0da52f762b9a0f6640 100644 |
--- a/test/mjsunit/object-get-own-property-names.js |
+++ b/test/mjsunit/object-get-own-property-names.js |
@@ -87,30 +87,20 @@ assertEquals('bar', propertyNames[1]); |
assertSame(Array.prototype, propertyNames.__proto__); |
Array.prototype.concat = savedConcat; |
-try { |
- Object.getOwnPropertyNames(4); |
- assertTrue(false); |
-} catch (e) { |
- assertTrue(/on non-object/.test(e)); |
-} |
- |
-try { |
- Object.getOwnPropertyNames("foo"); |
- assertTrue(false); |
-} catch (e) { |
- assertTrue(/on non-object/.test(e)); |
-} |
+assertEquals(Object.getOwnPropertyNames(4), []); |
+assertEquals(Object.getOwnPropertyNames("foo"), ["0", "1", "2", "length"]); |
+assertEquals(Object.getOwnPropertyNames(true), []); |
try { |
Object.getOwnPropertyNames(undefined); |
assertTrue(false); |
} catch (e) { |
- assertTrue(/on non-object/.test(e)); |
+ assertTrue(/Cannot convert undefined or null to object/.test(e)); |
} |
try { |
Object.getOwnPropertyNames(null); |
assertTrue(false); |
} catch (e) { |
- assertTrue(/on non-object/.test(e)); |
+ assertTrue(/Cannot convert undefined or null to object/.test(e)); |
} |