(iframeEl, fn)
| 4 | import "../../content_scripts/ui_component.js"; |
| 5 | |
| 6 | function stubPostMessage(iframeEl, fn) { |
| 7 | if (!iframeEl || !fn) throw new Error("iframeEl and fn are required."); |
| 8 | Object.defineProperty(iframeEl, "contentWindow", { |
| 9 | value: { postMessage: fn }, |
| 10 | writable: false, |
| 11 | configurable: true, |
| 12 | }); |
| 13 | } |
| 14 | |
| 15 | context("UIComponent", () => { |
| 16 | let c; |