chrome-extension-messaging-testslisted
Install: claude install-skill testland/qa
# chrome-extension-messaging-tests
## Overview
Extension components run in separate contexts (content script,
service worker, popup, options page, an external web page, a native
host process) and can only reach each other through the messaging
APIs described on the
[Chrome Extensions message passing page][cr-msg]. That page defines
five distinct shapes, each with its own failure mode:
[cr-msg]: https://developer.chrome.com/docs/extensions/develop/concepts/messaging
1. One-shot **runtime** messages inside one extension
(`chrome.runtime.sendMessage`).
2. One-shot **tabs** messages into a content script
(`chrome.tabs.sendMessage`).
3. Long-lived **ports** (`chrome.runtime.connect`).
4. **Cross-extension** and **web-page** messages, gated by
`externally_connectable`.
5. **Native messaging** (`chrome.runtime.connectNative`).
Most "the feature silently does nothing" bugs in an extension are one
of these five failing quietly: a channel closed before the response, a
message sent to a tab with no matching content script, a port dropped
by a suspended service worker, or an origin missing from an
allow-list. Tests here make each of those loud.
## Scope boundary
This skill owns **assertions about messages** once an extension is
installed and running: who can send, who receives, what the response
contract is, when a channel closes, and what a payload is allowed to
contain.
It deliberately does **not** cover getting the extension installed,
reloaded, or refreshed after a c