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 // |reftest| skip -- slow
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 var BUGNUMBER = 322135;
9 var summary = 'Array.prototype.unshift on Array with length 2^32-1';
10 var actual = 'Completed';
11 var expect = 'Completed';
13 printBugNumber(BUGNUMBER);
14 printStatus (summary);
16 printStatus('This bug passes if it does not cause an out of memory error');
17 printStatus('Other issues related to array length are not tested.');
19 var length = 4294967295;
20 var array = new Array(length);
22 try
23 {
24 array.unshift('Kibo');
25 }
26 catch(ex)
27 {
28 printStatus(ex.name + ': ' + ex.message);
29 }
30 reportCompare(expect, actual, summary);
32 //expect = 'Kibo';
33 //actual = array[0];
34 //reportCompare(expect, actual, summary + ': first prepended');
36 //expect = length;
37 //actual = array.length;
38 //reportCompare(expect, actual, summary + ': array length unchanged');