aboutsummaryrefslogtreecommitdiff
path: root/deps/v8/test/mjsunit/es7
diff options
context:
space:
mode:
authorBen Noordhuis <info@bnoordhuis.nl>2014-05-12 05:07:46 +0200
committerFedor Indutny <fedor@indutny.com>2014-06-12 17:46:17 -0700
commit3a280b2034e3ea438cd3a2e7acd1a4cd40112ac5 (patch)
treeae194faf83fd22ad890b421c2ebd537db1a52534 /deps/v8/test/mjsunit/es7
parent5413d9abe0df7e22bdb650a65f4c0ac462bbe147 (diff)
downloadandroid-node-v8-3a280b2034e3ea438cd3a2e7acd1a4cd40112ac5.tar.gz
android-node-v8-3a280b2034e3ea438cd3a2e7acd1a4cd40112ac5.tar.bz2
android-node-v8-3a280b2034e3ea438cd3a2e7acd1a4cd40112ac5.zip
deps: upgrade v8 to 3.26.33
Signed-off-by: Fedor Indutny <fedor@indutny.com>
Diffstat (limited to 'deps/v8/test/mjsunit/es7')
-rw-r--r--deps/v8/test/mjsunit/es7/object-observe.js16
1 files changed, 12 insertions, 4 deletions
diff --git a/deps/v8/test/mjsunit/es7/object-observe.js b/deps/v8/test/mjsunit/es7/object-observe.js
index f5e84a6286..7bb579f0c1 100644
--- a/deps/v8/test/mjsunit/es7/object-observe.js
+++ b/deps/v8/test/mjsunit/es7/object-observe.js
@@ -112,6 +112,8 @@ Object.defineProperty(changeRecordWithAccessor, 'name', {
// Object.observe
assertThrows(function() { Object.observe("non-object", observer.callback); },
TypeError);
+assertThrows(function() { Object.observe(this, observer.callback); },
+ TypeError);
assertThrows(function() { Object.observe(obj, nonFunction); }, TypeError);
assertThrows(function() { Object.observe(obj, frozenFunction); }, TypeError);
assertEquals(obj, Object.observe(obj, observer.callback, [1]));
@@ -126,6 +128,8 @@ assertEquals(obj, Object.observe(obj, observer.callback));
// Object.unobserve
assertThrows(function() { Object.unobserve(4, observer.callback); }, TypeError);
+assertThrows(function() { Object.unobserve(this, observer.callback); },
+ TypeError);
assertThrows(function() { Object.unobserve(obj, nonFunction); }, TypeError);
assertEquals(obj, Object.unobserve(obj, observer.callback));
@@ -134,6 +138,7 @@ assertEquals(obj, Object.unobserve(obj, observer.callback));
var notifier = Object.getNotifier(obj);
assertSame(notifier, Object.getNotifier(obj));
assertEquals(null, Object.getNotifier(Object.freeze({})));
+assertThrows(function() { Object.getNotifier(this) }, TypeError);
assertFalse(notifier.hasOwnProperty('notify'));
assertEquals([], Object.keys(notifier));
var notifyDesc = Object.getOwnPropertyDescriptor(notifier.__proto__, 'notify');
@@ -1073,6 +1078,8 @@ function TestObserveNonConfigurable(obj, prop, desc) {
Object.unobserve(obj, observer.callback);
}
+// TODO(rafaelw) Enable when ES6 Proxies are implemented
+/*
function createProxy(create, x) {
var handler = {
getPropertyDescriptor: function(k) {
@@ -1112,11 +1119,11 @@ function createProxy(create, x) {
Object.observe(handler.target, handler.callback);
return handler.proxy = create(handler, x);
}
+*/
var objects = [
{},
[],
- this, // global object
function(){},
(function(){ return arguments })(),
(function(){ "use strict"; return arguments })(),
@@ -1124,9 +1131,10 @@ var objects = [
new Date(),
Object, Function, Date, RegExp,
new Set, new Map, new WeakMap,
- new ArrayBuffer(10), new Int32Array(5),
- createProxy(Proxy.create, null),
- createProxy(Proxy.createFunction, function(){}),
+ new ArrayBuffer(10), new Int32Array(5)
+// TODO(rafaelw) Enable when ES6 Proxies are implemented.
+// createProxy(Proxy.create, null),
+// createProxy(Proxy.createFunction, function(){}),
];
var properties = ["a", "1", 1, "length", "setPrototype", "name", "caller"];