tor-browser

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

simple-module2.js (552B)


      1 // Copyright 2024 The Chromium Authors
      2 // Use of this source code is governed by a BSD-style license that can be
      3 // found in the LICENSE file.
      4 
      5 class TestURLSelectionOperation {
      6  async run(urls, data) {
      7    if (data && data.hasOwnProperty('setKey') &&
      8        data.hasOwnProperty('setValue')) {
      9      await sharedStorage.set(data['setKey'], data['setValue']);
     10    }
     11 
     12    if (data && data.hasOwnProperty('mockResult')) {
     13      return data['mockResult'];
     14    }
     15 
     16    return -1;
     17  }
     18 }
     19 
     20 register('test-url-selection-operation', TestURLSelectionOperation);