10a8696658f8135ae39eeb86e57f7cecc01144894Jason Evans// Copyright 2013 the V8 project authors. All rights reserved.
20a8696658f8135ae39eeb86e57f7cecc01144894Jason Evans// Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.
30a8696658f8135ae39eeb86e57f7cecc01144894Jason Evans//
40a8696658f8135ae39eeb86e57f7cecc01144894Jason Evans// Redistribution and use in source and binary forms, with or without
50a8696658f8135ae39eeb86e57f7cecc01144894Jason Evans// modification, are permitted provided that the following conditions
60a8696658f8135ae39eeb86e57f7cecc01144894Jason Evans// are met:
70a8696658f8135ae39eeb86e57f7cecc01144894Jason Evans// 1.  Redistributions of source code must retain the above copyright
80a8696658f8135ae39eeb86e57f7cecc01144894Jason Evans//     notice, this list of conditions and the following disclaimer.
90a8696658f8135ae39eeb86e57f7cecc01144894Jason Evans// 2.  Redistributions in binary form must reproduce the above copyright
100a8696658f8135ae39eeb86e57f7cecc01144894Jason Evans//     notice, this list of conditions and the following disclaimer in the
110a8696658f8135ae39eeb86e57f7cecc01144894Jason Evans//     documentation and/or other materials provided with the distribution.
120a8696658f8135ae39eeb86e57f7cecc01144894Jason Evans//
130a8696658f8135ae39eeb86e57f7cecc01144894Jason Evans// THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY
140a8696658f8135ae39eeb86e57f7cecc01144894Jason Evans// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
150a8696658f8135ae39eeb86e57f7cecc01144894Jason Evans// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
160a8696658f8135ae39eeb86e57f7cecc01144894Jason Evans// DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY
170a8696658f8135ae39eeb86e57f7cecc01144894Jason Evans// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
180a8696658f8135ae39eeb86e57f7cecc01144894Jason Evans// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
190a8696658f8135ae39eeb86e57f7cecc01144894Jason Evans// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
200a8696658f8135ae39eeb86e57f7cecc01144894Jason Evans// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
210a8696658f8135ae39eeb86e57f7cecc01144894Jason Evans// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
220a8696658f8135ae39eeb86e57f7cecc01144894Jason Evans// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
230a8696658f8135ae39eeb86e57f7cecc01144894Jason Evans
240a8696658f8135ae39eeb86e57f7cecc01144894Jason Evansdescription(
250a8696658f8135ae39eeb86e57f7cecc01144894Jason Evans"This tests that JavaScriptCore ForInNodes are converted correctly to text."
260a8696658f8135ae39eeb86e57f7cecc01144894Jason Evans);
270a8696658f8135ae39eeb86e57f7cecc01144894Jason Evans
280a8696658f8135ae39eeb86e57f7cecc01144894Jason Evansfunction test() {
290a8696658f8135ae39eeb86e57f7cecc01144894Jason Evans    for (j in index) {
300a8696658f8135ae39eeb86e57f7cecc01144894Jason Evans        testProperty(index[j]);
310a8696658f8135ae39eeb86e57f7cecc01144894Jason Evans    }
320a8696658f8135ae39eeb86e57f7cecc01144894Jason Evans}
330a8696658f8135ae39eeb86e57f7cecc01144894Jason Evans
342b51a3e9e9bfebf081d25dfa92f3cd89e4a8ed73Jason EvansshouldBeTrue("test.toString().match('for *[(]j *in *index[)]') != null");
352b51a3e9e9bfebf081d25dfa92f3cd89e4a8ed73Jason Evans