tor-browser

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

welcome.js (1182B)


      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 /* eslint-env node */
      6 
      7 const { logTest, logTask } = require("./utils/profiling");
      8 
      9 module.exports = logTest(
     10  "first-install test",
     11  async function (context, commands) {
     12    context.log.info("Starting a first-install test");
     13    let page_cycles = context.options.browsertime.page_cycles;
     14 
     15    for (let count = 0; count < page_cycles; count++) {
     16      await logTask(context, "cycle " + count, async function () {
     17        context.log.info("Navigating to about:blank");
     18 
     19        // See bug 1717754
     20        context.log.info(await commands.js.run(`return document.documentURI;`));
     21 
     22        await commands.navigate("about:blank");
     23 
     24        await commands.measure.start();
     25        await commands.wait.byTime(1000);
     26        await commands.navigate("about:welcome");
     27        await commands.wait.byTime(2000);
     28        await commands.measure.stop();
     29 
     30        await commands.wait.byTime(2000);
     31      });
     32    }
     33 
     34    context.log.info("First-install test ended.");
     35    return true;
     36  }
     37 );