I built a Chrome extension that replaces the new tab page with a daily sudoku puzzle. The generator and verifier were solid -- I'd already independently confirmed every puzzle has exactly one solution. What I hadn't done yet was actually test the extension itself. That gap mattered.
Actually launching a browser beats reading the code again
I used Playwright to load the extension's new-tab page for real, in a real Chromium instance, and drove it the way a person would: click a cell, type a number, click Reveal, click Check. First run: blank page. No board, no numbers, nothing. Reading the code wouldn't have caught this nearly as fast -- the bug only shows up outside the extension's own execution context.
The three bugs
- The blank page came from
if (chrome && chrome.storage...). Referencing an undefined global directly throws a ReferenceError -- it needstypeof chrome !== "undefined"first. Outside the extension's own context, that one line crashed the entire script silently, before the board ever rendered. - A footer link read "More puzzles \u2192" -- literally, backslash-u-2192, not an arrow. HTML doesn't interpret JS-style unicode escapes in plain text; that syntax only works inside a JS string. Needed the actual character or an HTML entity.
- That same footer link pointed at one specific book's ASIN, even though the extension rotates through three difficulty levels tied to three different books. Fixed by linking to a series search instead of a single title.
What actually got covered
After the fixes: cell input, wrong-answer detection (filled every empty cell with the same digit, confirmed the right ones got flagged red), reveal-then-check, difficulty switching, and localStorage persistence across a page reload. All driven the same way -- click, type, screenshot, verify -- not asserted from reading the source.
It's live on the Chrome Web Store now -- free, no tracking, puzzles bundled and verified offline. Link in the comments.
Top comments (0)