regress-477187.js (1216B)
1 // |reftest| skip-if(Android) 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 = 477187; 9 var summary = 'timeout script'; 10 var actual = ''; 11 var expect = ''; 12 13 //----------------------------------------------------------------------------- 14 test(); 15 //----------------------------------------------------------------------------- 16 17 function test() 18 { 19 printBugNumber(BUGNUMBER); 20 printStatus (summary); 21 22 if (typeof window != 'undefined' || typeof timeout != 'function') 23 { 24 print(expect = actual = 'Test skipped due to lack of timeout function'); 25 reportCompare(expect, actual, summary); 26 } 27 else 28 { 29 expectExitCode(6); 30 timeout(0.01); 31 // Call reportCompare early here to get a result. The test will fail if 32 // the timeout doesn't work and the test framework is forced to terminate 33 // the test. 34 reportCompare(expect, actual, summary); 35 36 while(1); 37 } 38 }