tor-browser

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

general.any.js (1171B)


      1 // META: global=worker
      2 
      3 // See
      4 // https://web-platform-tests.org/writing-tests/testharness.html#multi-global-tests
      5 // for how to specify in which global scopes to run this tests,
      6 // how to specify additional scripts needed, etc.
      7 
      8 // testharness.js is imported (via importScripts()) by generated glue code by
      9 // WPT server.
     10 // See ClassicWorkerHandler in
     11 // https://github.com/web-platform-tests/wpt/blob/master/tools/serve/serve.py.
     12 
     13 // ============================================================================
     14 
     15 // Test body.
     16 // .any.js tests are always testharness.js-based.
     17 test(() => {
     18    assert_equals(1, 1, "1 == 1");
     19  },
     20  "Test that should pass"
     21 );
     22 
     23 test(() => {
     24    // This file is "general.any.js" but the worker top-level script is
     25    // "general.any.worker.js", which is generated by the WPT server.
     26    assert_equals(location.pathname, "/workers/examples/general.any.worker.js");
     27  },
     28  "Worker top-level script is a generated script."
     29 );
     30 
     31 // done() is NOT needed in .any.js tests, as it is called by generated
     32 // glue code by the WPT server.
     33 // See ClassicWorkerHandler in
     34 // https://github.com/web-platform-tests/wpt/blob/master/tools/serve/serve.py.