tor-browser

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

test_oom_reporting.html (1143B)


      1 <!DOCTYPE HTML>
      2 <html>
      3 <!--
      4 https://bugzilla.mozilla.org/show_bug.cgi?id=
      5 -->
      6 <head>
      7  <meta charset="utf-8">
      8  <title>Test for Bug </title>
      9  <script src="/tests/SimpleTest/SimpleTest.js"></script>
     10  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
     11  <script type="application/javascript">
     12 
     13  /** Test for Bug  */
     14  SimpleTest.waitForExplicitFinish();
     15 
     16  SimpleTest.expectUncaughtException();
     17  setTimeout(function() {
     18    SpecialPowers.Cu.getJSTestingFunctions().throwOutOfMemory();
     19  }, 0);
     20 
     21  addEventListener("error", function(e) {
     22    is(e.type, "error", "Should have an error event");
     23    is(e.message, "uncaught exception: out of memory",
     24       "Should have the right error message");
     25    // Make sure we finish async, in case the expectUncaughtException assertion
     26    // about having seen the exception runs after our listener
     27    SimpleTest.executeSoon(SimpleTest.finish);
     28  });
     29 
     30 
     31  </script>
     32 </head>
     33 <body>
     34 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=">Mozilla Bug </a>
     35 <p id="display"></p>
     36 <div id="content" style="display: none">
     37 
     38 </div>
     39 <pre id="test">
     40 </pre>
     41 </body>
     42 </html>