tor-browser

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

browser_dbg-scroll-run-to-completion.js (818B)


      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 "use strict";
      6 
      7 add_task(async function () {
      8  const dbg = await initDebugger("doc-scroll-run-to-completion.html");
      9  invokeInTab("pauseOnce", "doc-scroll-run-to-completion.html");
     10  await waitForPaused(dbg);
     11  await assertPausedAtSourceAndLine(
     12    dbg,
     13    findSource(dbg, "doc-scroll-run-to-completion.html").id,
     14    20
     15  );
     16 
     17  await checkEvaluateInTopFrame(dbg, "window.scrollBy(0, 10);", undefined);
     18 
     19  // checkEvaluateInTopFrame does an implicit resume for some reason.
     20  await waitForPaused(dbg);
     21 
     22  const onTestPassed = once(Services.ppmm, "test passed");
     23  await resume(dbg);
     24  await onTestPassed;
     25 });