Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1123)

Unified Diff: test/mjsunit/object-get-own-property-names.js

Issue 613283002: Convert argument toObject() in Object.getOwnPropertyNames/Descriptors (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: FAIL_OK rather than SKIP Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « test/mjsunit/es6/symbols.js ('k') | test/test262/test262.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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));
}
« no previous file with comments | « test/mjsunit/es6/symbols.js ('k') | test/test262/test262.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698