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

Unified Diff: test/mjsunit/es6/built-in-accessor-names.js

Issue 1192433003: Revert of Add %TypedArray% to proto chain (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 6 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 | « src/typedarray.js ('k') | test/mjsunit/get-prototype-of.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/es6/built-in-accessor-names.js
diff --git a/test/mjsunit/es6/built-in-accessor-names.js b/test/mjsunit/es6/built-in-accessor-names.js
index 4cfebdc3c71f8df711b31805116fd005ac1725a7..d902ae6700aa52a93cadaa783f45d254085aec33 100644
--- a/test/mjsunit/es6/built-in-accessor-names.js
+++ b/test/mjsunit/es6/built-in-accessor-names.js
@@ -6,22 +6,14 @@
'use strict';
-function getPropertyDescriptor(object, field, expectedDepth) {
- for (var depth = 0; depth < expectedDepth; depth++) {
- assertFalse(Object.hasOwnProperty(object, field));
- object = object.__proto__;
- }
- return Object.getOwnPropertyDescriptor(object, field);
-}
-
-function assertGetterName(expected, object, name, expectedDepth) {
- var descr = getPropertyDescriptor(object, name, expectedDepth);
+function assertGetterName(expected, object, name) {
+ var descr = Object.getOwnPropertyDescriptor(object, name);
assertSame(expected, descr.get.name);
}
-function assertSetterName(expected, object, name, indirect) {
- var descr = getPropertyDescriptor(object, name);
+function assertSetterName(expected, object, name) {
+ var descr = Object.getOwnPropertyDescriptor(object, name);
assertSame(expected, descr.set.name);
}
@@ -44,11 +36,11 @@
];
for (let f of typedArrays) {
- assertGetterName('get buffer', f.prototype, 'buffer', 1);
- assertGetterName('get byteOffset', f.prototype, 'byteOffset', 1);
- assertGetterName('get byteLength', f.prototype, 'byteLength', 1);
- assertGetterName('get length', f.prototype, 'length', 1);
- assertGetterName('get [Symbol.toStringTag]', f.prototype, Symbol.toStringTag, 1);
+ assertGetterName('get buffer', f.prototype, 'buffer');
+ assertGetterName('get byteOffset', f.prototype, 'byteOffset');
+ assertGetterName('get byteLength', f.prototype, 'byteLength');
+ assertGetterName('get length', f.prototype, 'length');
+ assertGetterName('get [Symbol.toStringTag]', f.prototype, Symbol.toStringTag);
}
« no previous file with comments | « src/typedarray.js ('k') | test/mjsunit/get-prototype-of.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698