tor-browser

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

browser_aboutprofiling-entries.js (981B)


      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 test() {
      8  info("Test that about:profiling can modify the sampling interval.");
      9 
     10  await withAboutProfiling(async document => {
     11    is(
     12      getActiveConfiguration().capacity,
     13      128 * 1024 * 1024,
     14      "The active configuration is set to a specific number initially. If this" +
     15        " test fails here, then the magic numbers here may need to be adjusted."
     16    );
     17 
     18    info("Change the buffer input to an arbitrarily smaller value.");
     19    const bufferInput = await getNearestInputFromText(document, "Buffer size:");
     20    setReactFriendlyInputValue(bufferInput, Number(bufferInput.value) * 0.1);
     21 
     22    is(
     23      getActiveConfiguration().capacity,
     24      256 * 1024,
     25      "The capacity changed to a smaller value."
     26    );
     27  });
     28 });