js/src/tests/js1_5/Regress/regress-261887.js

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

     1 // |reftest| skip -- we violate the spec here with our new iterators
     2 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
     3 /* This Source Code Form is subject to the terms of the Mozilla Public
     4  * License, v. 2.0. If a copy of the MPL was not distributed with this
     5  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     7 //-----------------------------------------------------------------------------
     8 // testcase from Oscar Fogelberg <osfo@home.se>
     9 var BUGNUMBER = 261887;
    10 var summary = 'deleted properties should not be visited by for in';
    11 var actual = '';
    12 var expect = '';
    14 printBugNumber(BUGNUMBER);
    15 printStatus (summary);
    17 var count = 0;
    18 var result = "";
    19 var value = "";
    21 var t = new Object();
    22 t.one = "one";
    23 t.two = "two";
    24 t.three = "three";
    25 t.four = "four";
    27 for (var prop in t) {
    28   if (count==1) delete(t.three);
    29   count++;
    30   value = value + t[prop];
    31   result = result + prop;
    32 }
    34 expect = 'onetwofour:onetwofour';
    35 actual = value + ':' + result;
    37 reportCompare(expect, actual, summary);

mercurial