regress-341815.js (1852B)
1 // |reftest| skip -- bug xxx - fails to dismiss alert 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/. */ 6 7 //----------------------------------------------------------------------------- 8 var BUGNUMBER = 341815; 9 var summary = 'Close hook crash'; 10 var actual = 'No Crash'; 11 var expect = 'No Crash'; 12 13 var ialert = 0; 14 //----------------------------------------------------------------------------- 15 //test(); 16 //----------------------------------------------------------------------------- 17 18 function test() 19 { 20 printBugNumber(BUGNUMBER); 21 printStatus (summary); 22 23 var globalToPokeGC = {}; 24 25 function make_iterator() 26 { 27 function* generator() { 28 try { 29 yield 0; 30 } finally { 31 make_iterator(); 32 } 33 } 34 generator().next(); 35 globalToPokeGC = {}; 36 if (typeof alert != 'undefined') 37 { 38 alert(++ialert); 39 } 40 } 41 42 make_iterator(); 43 44 for (var i = 0; i != 50000; ++i) { 45 var x = {}; 46 } 47 48 print('done'); 49 50 setTimeout('checkTest()', 10000); 51 } 52 53 function init() 54 { 55 // give the dialog closer time to register 56 setTimeout('test()', 5000); 57 } 58 59 var lastialert = 0; 60 61 function checkTest() 62 { 63 // this function is used to check if there 64 // additional alerts are still being fired 65 // in order to prevent the test from completing 66 // until all alerts have finished. 67 68 if (ialert != lastialert) 69 { 70 lastialert = ialert; 71 setTimeout('checkTest()', 10000); 72 return; 73 } 74 75 reportCompare(expect, actual, summary); 76 gDelayTestDriverEnd = false; 77 jsTestDriverEnd(); 78 } 79 80 // delay test driver end 81 gDelayTestDriverEnd = true; 82 83 window.addEventListener("load", init, false);