Debian Codegraph @

js/src/tests/test262/language/directive-prologue/set-accsr-not-first-runtime.js

raw
1 // Copyright (c) 2012 Ecma International. All rights reserved.
2 // This code is governed by the BSD license found in the LICENSE file.
3
4 /*---
5 esid: use-strict-directive
6 es5id: 10.1.1-26-s
7 description: >
8 Strict Mode - Function code of Accessor PropertyAssignment
9 contains Use Strict Directive which appears at the start of the
10 block(setter)
11 flags: [noStrict]
12 ---*/
13
14 var data = "data";
15
16 assert.throws(ReferenceError, function() {
17 var obj = {};
18 Object.defineProperty(obj, "accProperty", {
19 set: function (value) {
20 "use strict";
21 test262unresolvable = null;
22 data = value;
23 }
24 });
25
26 obj.accProperty = "overrideData";
27 });
28
29 assert.sameValue(data, "data", 'data unchanged');
30
31 reportCompare(0, 0);