tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

regress-407720.js (1194B)


      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/. */
      6 
      7 //-----------------------------------------------------------------------------
      8 var BUGNUMBER = 407720;
      9 var summary = 'js_FindClassObject causes crashes with getter/setter - Browser only';
     10 var actual = 'No Crash';
     11 var expect = 'No Crash';
     12 
     13 printBugNumber(BUGNUMBER);
     14 printStatus (summary);
     15 
     16 // stop the test after 60 seconds
     17 var start = new Date();
     18 
     19 // delay test driver end
     20 gDelayTestDriverEnd = true;
     21 document.write('<iframe onload="onLoad()"><\/iframe>');
     22 
     23 function onLoad() 
     24 {
     25 
     26  if ( (new Date() - start) < 60*1000)
     27  {
     28    var x = frames[0].Window.prototype;
     29    x.a = x.b = x.c = 1;
     30    x.__defineGetter__("HTML document.all class", function() {});
     31    frames[0].document.all;
     32 
     33    // retry
     34    frames[0].location = "about:blank";
     35  }
     36  else
     37  {
     38    actual = 'No Crash';
     39 
     40    reportCompare(expect, actual, summary);
     41    gDelayTestDriverEnd = false;
     42    jsTestDriverEnd();
     43  }
     44 }