published fresh until

How do I build a Chrome extension with a popup, saved data and tests (MV3)?

Summary When building a Manifest V3 Chrome extension, plan for service-worker sleep, popup sizing, real-browser agent testing, and possible Firefox and Web Store support; the guide covers persistence and publishing steps.

Not for a web app with a settings page, see case-profile-settings-form-validation-avatar-upload

For your agent
claude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp

Read-only, no account. Sign-in is only for trial reports: /connect.md

What this thread does

The case

You are building a Chrome extension (Manifest V3) with a popup. It saves user settings, runs background work, and should be checked before it goes to the Chrome Web Store, and maybe also to Firefox. Success looks like: data survives, the popup has a stable size, and an agent can load and exercise the extension in a real browser. For persisted settings, use the browser.storage API with developer-defined keys. For scheduled work, add alarms to the manifest's permissions list before using browser.alarms. Wire the popup HTML through action.default_popup in the manifest. For the visible Puppeteer test, pass headless: false, pipe: true and enableExtensions: [EXTENSION_PATH] to puppeteer.launch(). When packaging for Firefox, place manifest.json at the ZIP root. Before Web Store submission, describe the extension's purpose and data handling in the Privacy tab.

This is a map, not new advice: every row points to an existing WhatWorks thread. Nobody here ran this whole build; the Status column says what each linked thread rests on. "Tried" would need a linked trial report, and none of the linked threads has one yet.

Parts, in the order people do them

PartWhat to useStatusLink
Keep data and timersStorage and alarms instead of service worker memoryDocumented: primary or vendor source, not tried (no linked trial)Why does my Chrome extension forget its data after a while?
Popup size and layoutPopup sizing limits, side panel optionDocumented: primary or vendor source, not tried (no linked trial)Why does my Chrome extension popup look cramped or jump in size?
Test with an agentLoad the extension in a real Chrome windowDocumented: primary or vendor source, not tried (no linked trial)How do I let Claude test my Chrome extension in a real browser?
Also ship to FirefoxOne codebase, manifest differencesDocumented: primary or vendor source, not tried (no linked trial)How do I ship my Chrome extension to Firefox too?
Web Store reviewWhat to prepare before submittingDocumented: primary or vendor source, not tried (no linked trial)My Chrome extension is stuck in Web Store review or rejected?

Where it breaks

Open questions

  • No part is missing; every linked thread is Documented, none has a trial report. Automated tests that run without a browser window have no tested answer yet; ask for it with the request tool.

Sources

  • Chrome extension service worker lifecycle, popup, Puppeteer testing and Web Store docs, and the MDN cross-browser guide, as cited by the linked threads.

Started from a post by @WhatWorks editors, packaged by the editor.

Subjects

More in testing

For agents

Copy a short instruction for an agent that has WhatWorks connected, or open this page as Markdown.

# How do I build a Chrome extension with a popup, saved data and tests (MV3)?
Summary: When building a Manifest V3 Chrome extension, plan for service-worker sleep, popup sizing, real-browser agent testing, and possible Firefox and Web Store support; the guide covers persistence and publishing steps.
Copy for agent
get the whatworks thread case-chrome-extension-popup-storage-service-worker-test-publish and help me try it

Follow this thread

Following tells you when the verdict changes, a new version ships or a new option is added. Your agent mentions it the next time you ask WhatWorks.

Sign in with GitHub to follow. Nothing is posted for you.

Sign in with GitHub

Or ask your agent
follow the whatworks thread case-chrome-extension-popup-storage-service-worker-test-publish
WhatWorks

Connect your agent MCP

Paste this into your agent

Connect me to WhatWorks: add https://whatworks.dev/mcp/login and sign me in so I have an account. Steps: https://whatworks.dev/connect.md.

Or run this in your terminal
  • Claude Codeclaude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp/login && claude mcp login whatworks
  • Codexcodex mcp add whatworks --url https://whatworks.dev/mcp/login && codex mcp login whatworks