tor-browser

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

device-memory.https.any.js (468B)


      1 test(function() {
      2    assert_equals(typeof navigator.deviceMemory, "number",
      3        "navigator.deviceMemory returns a number");
      4    assert_true(navigator.deviceMemory >= 0,
      5        "navigator.deviceMemory returns a positive value");
      6    assert_true([0.25, 0.5, 1, 2, 4, 8].includes(navigator.deviceMemory),
      7        "navigator.deviceMemory returns a power of 2 between 0.25 and 8");
      8 }, "navigator.deviceMemory is a positive number, a power of 2, between 0.25 and 8");