From 9ecd532a7176aab68611d0e0e05a8552b1824d0e Mon Sep 17 00:00:00 2001
From: Claude
Date: Sat, 28 Mar 2026 17:07:45 +0000
Subject: [PATCH 1/3] fix: include test-suite.html in build output
build.sh was not copying test-suite.html to dist/, causing "File not
found" when opening it as an extension page.
https://claude.ai/code/session_01KF4i7Ra7zCEDskxDBaNtcT
---
build.sh | 1 +
1 file changed, 1 insertion(+)
diff --git a/build.sh b/build.sh
index cd6681e..d300bff 100755
--- a/build.sh
+++ b/build.sh
@@ -32,6 +32,7 @@ build() {
# Copy other root files
cp README.md "$out/" 2>/dev/null || true
+ cp test-suite.html "$out/" 2>/dev/null || true
echo " → $out/ ready"
}
From ed9419f04b085d53def419012193efc79cb9b678 Mon Sep 17 00:00:00 2001
From: Claude
Date: Sat, 28 Mar 2026 18:13:17 +0000
Subject: [PATCH 2/3] fix: test suite CSP compatibility for Firefox extension
pages
Replace inline onclick handlers with addEventListener (Firefox
extension CSP blocks inline event handlers). Show loading state
and test count on page load.
https://claude.ai/code/session_01KF4i7Ra7zCEDskxDBaNtcT
---
test-suite.html | 19 ++++++++++++++-----
1 file changed, 14 insertions(+), 5 deletions(-)
diff --git a/test-suite.html b/test-suite.html
index 7654017..712b2f3 100644
--- a/test-suite.html
+++ b/test-suite.html
@@ -29,8 +29,8 @@
Load this page as an extension page (or inject via dev console on the Options page).
Tests exercise sync, encryption, storage, auto-redact, and domain management.
-
-
+
+
@@ -485,7 +485,8 @@
// RUN ALL
// ============================================================
- window.runAllTests = async function() {
+ async function runAllTests() {
+ document.getElementById('results').innerHTML = 'Running tests...
';
const outcomes = [];
for (const t of results) {
try {
@@ -497,10 +498,18 @@
}
}
renderResults(outcomes);
- };
+ }
- // Auto-register tests on load
+ // Wire up buttons (CSP blocks inline onclick)
+ document.getElementById('btnRunTests').addEventListener('click', runAllTests);
+ document.getElementById('btnClear').addEventListener('click', () => {
+ document.getElementById('results').innerHTML = '';
+ document.getElementById('summary').textContent = '';
+ });
+
+ // Show ready state
console.log(`[Silent Send Tests] ${results.length} tests registered. Click "Run All Tests" to start.`);
+ document.getElementById('results').innerHTML = `${results.length} tests loaded. Click "Run All Tests" to start.
`;