~ubuntu-branches/ubuntu/trusty/mozjs24/trusty-proposed

« back to all changes in this revision

Viewing changes to js/src/jit-test/tests/proxy/testDirectProxyKeys5.js

  • Committer: Package Import Robot
  • Author(s): Tim Lunn
  • Date: 2014-02-11 21:55:34 UTC
  • Revision ID: package-import@ubuntu.com-20140211215534-m1zyq5aj59md3y07
Tags: upstream-24.2.0
ImportĀ upstreamĀ versionĀ 24.2.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
load(libdir + "asserts.js");
 
2
 
 
3
/*
 
4
 * Throw a TypeError if the trap reports a new own property on a non-extensible
 
5
 * object
 
6
 */
 
7
var target = {};
 
8
Object.preventExtensions(target);
 
9
assertThrowsInstanceOf(function () {
 
10
    Object.keys(new Proxy(target, {
 
11
        keys: function (target) {
 
12
            return [ 'foo' ];
 
13
        }
 
14
    }));
 
15
}, TypeError);