tor-browser

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

test_flatten.js (554B)


      1 /* Any copyright is dedicated to the Public Domain.
      2   http://creativecommons.org/publicdomain/zero/1.0/ */
      3 
      4 "use strict";
      5 
      6 // Test ThreadSafeDevToolsUtils.flatten
      7 
      8 function run_test() {
      9  const { flatten } = DevToolsUtils;
     10 
     11  const flat = flatten([
     12    ["a", "b", "c"],
     13    ["d", "e", "f"],
     14    ["g", "h", "i"],
     15  ]);
     16 
     17  equal(flat.length, 9);
     18  equal(flat[0], "a");
     19  equal(flat[1], "b");
     20  equal(flat[2], "c");
     21  equal(flat[3], "d");
     22  equal(flat[4], "e");
     23  equal(flat[5], "f");
     24  equal(flat[6], "g");
     25  equal(flat[7], "h");
     26  equal(flat[8], "i");
     27 }