1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/js/src/tests/js1_8_5/extensions/regress-696109.js Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,19 @@ 1.4 +// |reftest| skip-if(!xulRuntime.shell) 1.5 +/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ 1.6 +/* 1.7 + * Any copyright is dedicated to the Public Domain. 1.8 + * http://creativecommons.org/licenses/publicdomain/ 1.9 + * Contributor: Dave Herman <dherman@mozilla.com> 1.10 + */ 1.11 + 1.12 +// Bug 696109 - fixed a precedence bug in with/while nodes 1.13 +try { 1.14 + Reflect.parse("with({foo})bar"); 1.15 + throw new Error("supposed to be a syntax error"); 1.16 +} catch (e if e instanceof SyntaxError) { } 1.17 +try { 1.18 + Reflect.parse("while({foo})bar"); 1.19 + throw new Error("supposed to be a syntax error"); 1.20 +} catch (e if e instanceof SyntaxError) { } 1.21 + 1.22 +reportCompare(true, true);