Unit tests caught the easy bugs. The ones that would have shipped broken were all found the same way: loading the built extension package in a real headless Chrome and driving it against real pages. I use the same rig for four extensions now. Here is the setup, and what it caught.

The rig

  • Headless Chrome 154, driven by puppeteer, with the built Chrome package loaded unpacked.
  • A small local proxy in Node that handles CONNECT and forwards to the environment's upstream proxy, so the sandboxed browser can reach the real internet. (Chrome's --screenshot one-liner timed out three times at 25 seconds in this environment; puppeteer's page.evaluate plus clip screenshots finished in 8 seconds.)
  • Each probe is a script of numbered assertions. A run ends with a pass count, like 19/19. A failing assertion names the bug.

What fixtures missed

SessionSnap, a session manager, had two P0 bugs that unit tests could not see, because the tests import the modules directly. First, the background script used importScripts('src/lib/...') — a service worker resolves that relative to its own location, so it became src/src/lib/... (404) and the worker never installed. Second, onMessage wrapped the handler in an async IIFE without calling it, so (async()=>{...}).then(sendResponse) threw "(intermediate value).then is not a function" and no message was ever handled. Both fixed, regression tests added (suite 164 to 166), and the real-browser re-run passed 19/19: snapshot 2 tabs, search, import 2 Session Buddy sessions, export, restore into a new window, close log, and activation-key checks.

FocusBlock, a website blocker, had a subtler one. Its declarativeNetRequest rules registered fine, but the redirect action silently did nothing. Chrome requires host_permissions for the request URL when the action is redirect; the declarativeNetRequest permission alone only covers allow and block. I added "<all_urls>" to host_permissions plus web_accessible_resources for the block page. Re-test: example.com over http and https went to the local block page, a keyword rule blocked, a control page loaded normally, stats counted 3 blocks, and a 65-second focus session counted as 1 minute and 1 session.

YouTube Transcript Export hit a network reality, not a code bug. The timedtext endpoint returns empty bodies from datacenter IPs — in a real browser too (json3 through srv3 all empty, no challenge page). It is not a curl artifact. The fallback is the transcript panel DOM, which YouTube has changed: the old ytd-transcript-segment-renderer selector returns 0 rows, and the current DOM is <transcript-segment-view-model>. The panel path returned 24 cues and 2,066 characters, and all four formats were built from those real cues (TXT 2,335 / MD 2,668 / SRT 3,142 / VTT 3,162 bytes).

ConvoExport, a ChatGPT/Claude conversation exporter, was tested against public ChatGPT share pages as the real DOM: a 14-turn conversation exported as 6,264 bytes of Markdown, a 5-turn one as 30,636 bytes. One trap: reading immediately after load labels every message "user" because hydration has not finished. Wait about 30 seconds and re-read, and the roles come out right.

What I do not claim

Claude share pages were blocked by a Cloudflare challenge in this environment — the content script pinged, but the adapter never saw a real DOM. The Claude adapter's evidence is fixture tests only until a different network or a logged-in session lets me re-test. I say so rather than implying full coverage.

The panel fallback only returns the rows YouTube has rendered (the first 24 here), not the full transcript. Timedtext is still the only full-length path, and I cannot verify it from a datacenter IP.

The checklist I reuse

  • Load the built package, not the source tree. The package is what ships; one of my builds once shipped two manifest.json files because the packager copied src/ whole. A check that only runs against the built package catches that.
  • One assertion per observable behavior, with real numbers in the output.
  • End with a pass count. A run that ends 18/19 names the one thing to fix.
  • Kill helper processes by PID, not by pattern. I once killed my own shell with pkill -f matching its own command line.

The rig is small — a headless browser, a local relay, numbered assertions — but it is the difference between "tests pass" and "the thing works on a real page". The extensions built this way: FocusBlock is live on Edge Add-ons (https://microsoftedge.microsoft.com/addons/detail/focusblock/kdpeddhiegpfadpjiaieoaeiloebgdhp), and ConvoExport, YouTube Transcript Export, and SessionSnap are in review there. Each listing links a privacy page explaining what the extension stores locally (FocusBlock's is at https://alapha888.github.io/focus-block-privacy/).