tor-browser

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

spec.src.json (11540B)


      1 {
      2  "test_description_template": "Mixed-Content: Expects %(expectation)s for %(subresource)s to %(origin)s origin and %(redirection)s redirection from %(source_scheme)s context.",
      3  "test_page_title_template": "Mixed-Content: %(title)s",
      4  "specification": [
      5    {
      6      // optionally-blockable
      7      "title": "Optionally-blockable content",
      8      "description": "Test behavior of optionally-blockable content",
      9      "specification_url": "http://www.w3.org/TR/mixed-content/#category-optionally-blockable",
     10      "test_expansion": [
     11        {
     12          // opt-in-blocks
     13          "expansion": "default",
     14          "source_scheme": "https",
     15          "source_context_list": "*",
     16          "delivery_type": "*",
     17          "delivery_value": "opt-in",
     18          "redirection": "*",
     19          "subresource": [
     20            "audio-tag",
     21            "img-tag",
     22            "video-tag"
     23          ],
     24          "origin": [
     25            "cross-http",
     26            "same-http"
     27          ],
     28          "expectation": "blocked"
     29        },
     30        {
     31          // opt-in-blocks-redirects
     32          "expansion": "default",
     33          "source_scheme": "https",
     34          "source_context_list": "*",
     35          "delivery_type": "*",
     36          "delivery_value": "opt-in",
     37          "redirection": "swap-scheme",
     38          "subresource": [
     39            "audio-tag",
     40            "img-tag",
     41            "video-tag"
     42          ],
     43          "origin": [
     44            "same-https",
     45            "cross-https"
     46          ],
     47          "expectation": "blocked"
     48        },
     49        {
     50          // no-opt-in-allows
     51          "expansion": "default",
     52          "source_scheme": "https",
     53          "source_context_list": "*",
     54          "delivery_type": "*",
     55          "delivery_value": null,
     56          "redirection": "*",
     57          "subresource": [
     58            "audio-tag",
     59            "img-tag",
     60            "video-tag"
     61          ],
     62          "origin": [
     63            "cross-http",
     64            "same-http"
     65          ],
     66          "expectation": "allowed"
     67        }
     68      ]
     69    },
     70    {
     71      // blockable
     72      "title": "Blockable content",
     73      "description": "Test behavior of blockable content.",
     74      "specification_url": "http://www.w3.org/TR/mixed-content/#category-blockable",
     75      "test_expansion": [
     76        {
     77          // opt-in-blocks
     78          "expansion": "default",
     79          "source_scheme": "https",
     80          "source_context_list": "*",
     81          "delivery_type": "*",
     82          "delivery_value": "opt-in",
     83          "redirection": "*",
     84          "subresource": [
     85            "a-tag",
     86            "beacon",
     87            "fetch",
     88            "link-css-tag",
     89            "link-prefetch-tag",
     90            "object-tag",
     91            "picture-tag",
     92            "script-tag",
     93            "sharedworker-classic",
     94            "sharedworker-import",
     95            "sharedworker-import-data",
     96            "sharedworker-module",
     97            "websocket",
     98            "worker-classic",
     99            "worker-import",
    100            "worker-import-data",
    101            "worker-module",
    102            "worklet-animation",
    103            "worklet-animation-import-data",
    104            "worklet-audio",
    105            "worklet-audio-import-data",
    106            "worklet-layout",
    107            "worklet-layout-import-data",
    108            "worklet-paint",
    109            "worklet-paint-import-data",
    110            "xhr"
    111          ],
    112          "origin": [
    113            "cross-http",
    114            "same-http"
    115          ],
    116          "expectation": "blocked"
    117        },
    118        {
    119          // opt-in-blocks-redirects
    120          "expansion": "default",
    121          "source_scheme": "https",
    122          "source_context_list": "*",
    123          "delivery_type": "*",
    124          "delivery_value": "opt-in",
    125          "redirection": "swap-scheme",
    126          "subresource": [
    127            "a-tag",
    128            "beacon",
    129            "fetch",
    130            "link-css-tag",
    131            "link-prefetch-tag",
    132            "object-tag",
    133            "picture-tag",
    134            "script-tag",
    135            "sharedworker-classic",
    136            "sharedworker-import",
    137            "sharedworker-import-data",
    138            "sharedworker-module",
    139            "websocket",
    140            "worker-classic",
    141            "worker-import",
    142            "worker-import-data",
    143            "worker-module",
    144            "worklet-animation",
    145            "worklet-animation-import-data",
    146            "worklet-audio",
    147            "worklet-audio-import-data",
    148            "worklet-layout",
    149            "worklet-layout-import-data",
    150            "worklet-paint",
    151            "worklet-paint-import-data",
    152            "xhr"
    153          ],
    154          "origin": [
    155            "same-https",
    156            "cross-https"
    157          ],
    158          "expectation": "blocked"
    159        },
    160        {
    161          // no-opt-in-blocks
    162          "expansion": "default",
    163          "source_scheme": "https",
    164          "source_context_list": "*",
    165          "delivery_type": "*",
    166          "delivery_value": null,
    167          "redirection": "*",
    168          "subresource": [
    169            "a-tag",
    170            "beacon",
    171            "fetch",
    172            "link-css-tag",
    173            "link-prefetch-tag",
    174            "object-tag",
    175            "picture-tag",
    176            "script-tag",
    177            "sharedworker-classic",
    178            "sharedworker-import",
    179            "sharedworker-import-data",
    180            "sharedworker-module",
    181            "websocket",
    182            "worker-classic",
    183            "worker-import",
    184            "worker-import-data",
    185            "worker-module",
    186            "worklet-animation",
    187            "worklet-animation-import-data",
    188            "worklet-audio",
    189            "worklet-audio-import-data",
    190            "worklet-layout",
    191            "worklet-layout-import-data",
    192            "worklet-paint",
    193            "worklet-paint-import-data",
    194            "xhr"
    195          ],
    196          "origin": [
    197            "cross-http",
    198            "same-http"
    199          ],
    200          "expectation": "blocked"
    201        },
    202        {
    203          // ws-downgrade-blocks
    204          "expansion": "default",
    205          "source_scheme": "https",
    206          "source_context_list": "*",
    207          "delivery_type": "*",
    208          "delivery_value": "*",
    209          "redirection": "*",
    210          "subresource": "websocket",
    211          "origin": [
    212            "cross-ws",
    213            "same-ws"
    214          ],
    215          "expectation": "blocked"
    216        }
    217      ]
    218    },
    219    {
    220      // allowed
    221      "title": "Allowed content",
    222      "description": "Test behavior of allowed content.",
    223      "specification_url": "http://www.w3.org/TR/mixed-content/",
    224      "test_expansion": [
    225        {
    226          // allowed
    227          "expansion": "default",
    228          "source_scheme": "https",
    229          "source_context_list": "*",
    230          "delivery_type": "*",
    231          "delivery_value": "*",
    232          "redirection": [
    233            "no-redirect",
    234            "keep-scheme"
    235          ],
    236          "subresource": "*",
    237          "origin": [
    238            "same-https"
    239          ],
    240          "expectation": "allowed"
    241        },
    242        {
    243          // websocket-allowed
    244          "expansion": "default",
    245          "source_scheme": "https",
    246          "source_context_list": "*",
    247          "delivery_type": "*",
    248          "delivery_value": "*",
    249          "redirection": [
    250            "no-redirect",
    251            "keep-scheme"
    252          ],
    253          "subresource": "websocket",
    254          "origin": [
    255            "same-wss"
    256          ],
    257          "expectation": "allowed"
    258        }
    259      ]
    260    }
    261  ],
    262  "delivery_key": "mixedContent",
    263  "excluded_tests": [
    264    {
    265      // Skip-redundant-no-opt-in
    266      "expansion": "*",
    267      "source_scheme": "*",
    268      "source_context_list": [
    269        // In certain source_context_lists (workers),
    270        // this is not redundant because <meta> is not supported.
    271        "top",
    272        "srcdoc-inherit",
    273        "iframe",
    274        "iframe-blank-inherit",
    275        "worker-classic-data",
    276        "worker-module-data",
    277        "sharedworker-classic-data",
    278        "sharedworker-module-data"
    279      ],
    280      "delivery_type": "http-rp",
    281      "delivery_value": null,
    282      "redirection": "*",
    283      "subresource": "*",
    284      "origin": "*",
    285      "expectation": "*"
    286    },
    287    {
    288      // Skip-redundant-for-opt-in-method
    289      "expansion": "*",
    290      "source_scheme": "*",
    291      "source_context_list": "*",
    292      "delivery_type": "meta",
    293      "delivery_value": "opt-in",
    294      "redirection": [
    295        "keep-scheme",
    296        "swap-scheme"
    297      ],
    298      "subresource": "*",
    299      "origin": "*",
    300      "expectation": "*"
    301    },
    302    {
    303      // source_context_list values not yet tested
    304      "expansion": "*",
    305      "source_scheme": "*",
    306      "source_context_list": [
    307        "req",
    308        "srcdoc-inherit",
    309        "srcdoc",
    310        "iframe",
    311        "iframe-blank-inherit"
    312      ],
    313      "delivery_type": "*",
    314      "delivery_value": "*",
    315      "redirection": "*",
    316      "subresource": "*",
    317      "origin": "*",
    318      "expectation": "*"
    319    },
    320    {
    321      // subresource values not yet tested
    322      "expansion": "*",
    323      "source_scheme": "*",
    324      "source_context_list": "*",
    325      "delivery_type": "*",
    326      "delivery_value": "*",
    327      "redirection": "*",
    328      "subresource": [
    329        "a-tag",
    330        "area-tag",
    331        "iframe-tag",
    332      ],
    333      "origin": "*",
    334      "expectation": "*"
    335    },
    336    {
    337      // redirections that mixed-content tests don't care
    338      "expansion": "*",
    339      "source_scheme": "*",
    340      "source_context_list": "*",
    341      "delivery_type": "*",
    342      "delivery_value": "*",
    343      "redirection": [
    344        "keep-origin",
    345        "swap-origin",
    346        "downgrade"
    347      ],
    348      "origin": "*",
    349      "subresource": "*",
    350      "expectation": "*"
    351    },
    352  ],
    353  "source_context_schema": {
    354    "supported_delivery_type": {
    355      "top": [
    356        "http-rp",
    357        "meta"
    358      ],
    359      "iframe": [
    360        "http-rp",
    361        "meta"
    362      ],
    363      "iframe-blank": [
    364        "meta"
    365      ],
    366      "srcdoc": [
    367        "meta"
    368      ],
    369      "worker-classic": [
    370        "http-rp"
    371      ],
    372      "worker-module": [
    373        "http-rp"
    374      ],
    375      "worker-classic-data": [],
    376      "worker-module-data": [],
    377      "sharedworker-classic": [
    378        "http-rp"
    379      ],
    380      "sharedworker-module": [
    381        "http-rp"
    382      ],
    383      "sharedworker-classic-data": [],
    384      "sharedworker-module-data": []
    385    }
    386  },
    387  "subresource_schema": {
    388    "supported_delivery_type": {
    389      "a-tag": [],
    390      "area-tag": [],
    391      "audio-tag": [],
    392      "beacon": [],
    393      "fetch": [],
    394      "iframe-tag": [],
    395      "img-tag": [],
    396      "link-css-tag": [],
    397      "link-prefetch-tag": [],
    398      "object-tag": [],
    399      "picture-tag": [],
    400      "script-tag": [],
    401      "script-tag-dynamic-import": [],
    402      "sharedworker-classic": [],
    403      "sharedworker-import": [],
    404      "sharedworker-import-data": [],
    405      "sharedworker-module": [],
    406      "video-tag": [],
    407      "websocket": [],
    408      "worker-classic": [],
    409      "worker-import": [],
    410      "worker-import-data": [],
    411      "worker-module": [],
    412      "worklet-animation": [],
    413      "worklet-animation-import-data": [],
    414      "worklet-audio": [],
    415      "worklet-audio-import-data": [],
    416      "worklet-layout": [],
    417      "worklet-layout-import-data": [],
    418      "worklet-paint": [],
    419      "worklet-paint-import-data": [],
    420      "xhr": []
    421    }
    422  },
    423  "test_expansion_schema": {
    424    "delivery_type": [
    425      "http-rp",
    426      "meta"
    427    ],
    428    "delivery_value": [
    429      null,
    430      "opt-in"
    431    ],
    432    "expectation": [
    433      "allowed",
    434      "blocked"
    435    ]
    436  }
    437 }