tor-browser

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

browser_dbg-eval-throw.js (686B)


      1 /* This Source Code Form is subject to the terms of the Mozilla Public
      2 * License, v. 2.0. If a copy of the MPL was not distributed with this
      3 * file, You can obtain one at <http://mozilla.org/MPL/2.0/>. */
      4 
      5 // Test that exceptions thrown while evaluating code will pause at the point the
      6 // exception was generated when pausing on uncaught exceptions.
      7 
      8 "use strict";
      9 
     10 add_task(async function () {
     11  const dbg = await initDebugger("doc-eval-throw.html");
     12  await togglePauseOnExceptions(dbg, true, true);
     13 
     14  invokeInTab("evaluateException");
     15  await waitForPaused(dbg);
     16  const source = dbg.selectors.getSelectedSource();
     17  ok(!source.url, "Selected source should not have a URL");
     18 });