Skip to content

Add tests for tor circuit panel

When we have our test infrastructure, here are some features to test from #41600 (closed):

  1. The toolbar button is hidden for pages with no circuit. Like "about:" pages, but also more obscure pages like data:text/plain,hello.
  2. The toolbar button is shown for web pages. Clicking or pressing Space or Enter on the toolbar button opens the panel, takes focus into the panel, and shows the circuit.
  3. When using a bridge, the first circuit node is a bridge node. Otherwise the first circuit node is marked as a guard.
  4. Onion sites show an extra "onion relays" item in the circuit.
  5. Onion site names are shortened.
  6. Pages with onion aliases show the alias in the panel header. Clicking the alias opens it in a new tab. It also has a context menu to copy the link, open in a new tab, or open in a new window.
  7. Switching tabs whilst the panel is open will update the panel for the new page's circuit, or close the panel if the new tab has no circuit. E.g. with Ctrl+Tab.
  8. Clicking the "New circuit for this site" will close the panel and reload the page with a new circuit. If the panel is re-opened whilst the new circuit is still be established (e.g. for onion sites it can take a while) then the old circuit is still shown.
  9. Triggering a new circuit whilst the panel is open with Ctrl+Shift+L will not close the panel, and once the new cirucit is found the circuit display is updated.
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information