~ubuntu-branches/ubuntu/saucy/mozjs17/saucy

« back to all changes in this revision

Viewing changes to js/src/tests/js1_8_5/extensions/set-property-non-extensible.js

  • Committer: Package Import Robot
  • Author(s): Rico Tzschichholz
  • Date: 2013-05-25 12:24:23 UTC
  • Revision ID: package-import@ubuntu.com-20130525122423-zmxucrhtensw90xy
Tags: upstream-17.0.0
ImportĀ upstreamĀ versionĀ 17.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
// Any copyright is dedicated to the Public Domain.
 
2
// http://creativecommons.org/licenses/publicdomain/
 
3
 
 
4
//-----------------------------------------------------------------------------
 
5
var BUGNUMBER = 600128;
 
6
var summary =
 
7
  "Properly handle attempted addition of properties to non-extensible objects";
 
8
 
 
9
print(BUGNUMBER + ": " + summary);
 
10
 
 
11
/**************
 
12
 * BEGIN TEST *
 
13
 **************/
 
14
 
 
15
var o = Object.freeze({});
 
16
for (var i = 0; i < 10; i++)
 
17
  print(o.u = "");
 
18
 
 
19
Object.freeze(this);
 
20
for (let j = 0; j < 10; j++)
 
21
  print(u = "");
 
22
 
 
23
 
 
24
/******************************************************************************/
 
25
 
 
26
if (typeof reportCompare === "function")
 
27
  reportCompare(true, true);
 
28
 
 
29
print("All tests passed!");