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.

`;