tor-browser

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

parsing-addresses-absolute.json (2132B)


      1 {
      2  "name": "Absolute URL addresses",
      3  "tests": {
      4    "should only accept absolute URL addresses with fetch schemes": {
      5      "importMap": {
      6        "imports": {
      7          "about": "about:good",
      8          "blob": "blob:good",
      9          "data": "data:good",
     10          "file": "file:///good",
     11          "filesystem": "filesystem:http://example.com/good/",
     12          "http": "http://good/",
     13          "https": "https://good/",
     14          "ftp": "ftp://good/",
     15          "import": "import:bad",
     16          "mailto": "mailto:bad",
     17          "javascript": "javascript:bad",
     18          "wss": "wss:bad"
     19        }
     20      },
     21      "importMapBaseURL": "https://base.example/path1/path2/path3",
     22      "expectedParsedImportMap": {
     23        "imports": {
     24          "about": "about:good",
     25          "blob": "blob:good",
     26          "data": "data:good",
     27          "file": "file:///good",
     28          "filesystem": "filesystem:http://example.com/good/",
     29          "http": "http://good/",
     30          "https": "https://good/",
     31          "ftp": "ftp://good/",
     32          "import": "import:bad",
     33          "javascript": "javascript:bad",
     34          "mailto": "mailto:bad",
     35          "wss": "wss://bad/"
     36        },
     37        "scopes": {}
     38      }
     39    },
     40    "should parse absolute URLs, ignoring unparseable ones": {
     41      "importMap": {
     42        "imports": {
     43          "unparseable2": "https://example.com:demo",
     44          "unparseable3": "http://[www.example.com]/",
     45          "invalidButParseable1": "https:example.org",
     46          "invalidButParseable2": "https://///example.com///",
     47          "prettyNormal": "https://example.net",
     48          "percentDecoding": "https://ex%41mple.com/"
     49        }
     50      },
     51      "importMapBaseURL": "https://base.example/path1/path2/path3",
     52      "expectedParsedImportMap": {
     53        "imports": {
     54          "unparseable2": null,
     55          "unparseable3": null,
     56          "invalidButParseable1": "https://example.org/",
     57          "invalidButParseable2": "https://example.com///",
     58          "prettyNormal": "https://example.net/",
     59          "percentDecoding": "https://example.com/"
     60        },
     61        "scopes": {}
     62      }
     63    }
     64  }
     65 }