tor-browser

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

test_registration_missing_scope.js (571B)


      1 /* Any copyright is dedicated to the Public Domain.
      2   http://creativecommons.org/publicdomain/zero/1.0/ */
      3 
      4 "use strict";
      5 
      6 function run_test() {
      7  do_get_profile();
      8  setPrefs();
      9  run_next_test();
     10 }
     11 
     12 add_task(async function test_registration_missing_scope() {
     13  PushService.init({
     14    serverURI: "wss://push.example.org/",
     15    makeWebSocket(uri) {
     16      return new MockWebSocket(uri);
     17    },
     18  });
     19  await Assert.rejects(
     20    PushService.registration({ scope: "", originAttributes: "" }),
     21    /Invalid page record/,
     22    "Record missing page and manifest URLs"
     23  );
     24 });