Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 //-----------------------------------------------------------------------------
7 // this test originally was only seen if typed into the js shell.
8 // loading as a script file did not exhibit the problem.
9 // this test case may not exercise the problem properly.
11 var BUGNUMBER = 254974;
12 var summary = 'all var and arg properties should be JSPROP_SHARED';
13 var actual = '';
14 var expect = '';
16 printBugNumber(BUGNUMBER);
17 printStatus (summary);
19 function testfunc(tokens) {
20 function eek(y) {} /* remove function eek and the code will change its behavior */
21 return tokens.split(/\]?(?:\[|$)/).shift();
22 }
23 bad=testfunc;
24 function testfunc(tokens) {
25 return tokens.split(/\]?(?:\[|$)/).shift();
26 }
27 good=testfunc;
29 var goodvalue = good("DIV[@id=\"test\"]");
30 var badvalue = bad("DIV[@id=\"test\"]");
32 printStatus(goodvalue);
33 printStatus(badvalue);
35 expect = goodvalue;
36 actual = badvalue;
38 reportCompare(expect, actual, summary);