Now let's test all the features to make sure everything works correctly.
Goal: Verify the extension is running and logging correctly.
- Open any website (e.g.,
example.comorgoogle.com) - Open DevTools Console (Press
F12orCmd+Option+Ion Mac) - Look for initialization messages:
[Kala] Content script loaded, initializing... [Kala] Content script initializing... [Kala] Domain: example.com [Kala] Protection ENABLED
✅ Success: You should see initialization logs with [Kala] prefix.
Goal: Verify keyboard events are being intercepted and delayed.
- On any website, click in a text input field (search bar, form field, etc.)
- Open DevTools Console (F12)
- Type some characters (e.g., "hello")
- Watch the console for logs like:
[Kala] Intercepted keydown: h [Kala] Context: { gaming: false, formField: true, ... } [Kala] Calculated delay: 65.23ms [Kala] Enqueued event 0: h scheduled for +65ms [Kala] Dispatching delayed keydown: h
✅ Success:
- You see "Intercepted keydown" for each key
- Delay values are shown (50-100ms range)
- Events are queued and dispatched
- Text still appears in the input (slightly delayed)
Goal: Verify the popup interface works correctly.
- Click the Kala extension icon in your browser toolbar
- The popup should open showing:
- 🛡️ Kala title
- Current website domain
- Protection toggle (should be ON by default)
- Privacy Level dropdown (should show "Medium")
- Settings and Help buttons
Test the toggle:
- Click the toggle to disable protection
- Console should show:
[Kala] Protection disabled - Click again to enable
- Console should show:
[Kala] Protection enabled
Test privacy levels:
- Change dropdown from "Medium" to "High"
- Type in an input field
- Check console - delays should be larger (80-150ms range)
- Change to "Low"
- Delays should be smaller (30-50ms range)
✅ Success: Popup opens, shows current site, toggle works, privacy level changes affect delays.
Goal: Verify events maintain correct order despite delays.
- Open a text input field
- Type quickly: "abc"
- Watch the console logs
- Verify the text appears as "abc" (not "bac" or "acb")
Expected console output:
[Kala] Enqueued event 0: a scheduled for +65ms
[Kala] Enqueued event 1: b scheduled for +72ms
[Kala] Enqueued event 2: c scheduled for +68ms
[Kala] Processing event 0: a
[Kala] Processing event 1: b
[Kala] Processing event 2: c
✅ Success: Text appears in correct order, events processed by original index.
Goal: Verify context detection adjusts delays appropriately.
Test Gaming Context:
- Visit a website with WebGL/Canvas (e.g., a game site)
- Type in an input field
- Check console - should show:
Context: { gaming: true, ... } - Delays should be reduced (gaming adjustment: -20ms)
Test Form Field:
- Visit a website with a form (e.g., login page)
- Type in an input field
- Check console - should show:
Context: { formField: true, ... } - Delays should be slightly increased (+10ms)
Test Search Field:
- Visit Google or any site with a search bar
- Type in the search field
- Check console - should show:
Context: { searchField: true, ... } - Delays should be reduced (-10ms)
✅ Success: Context is detected correctly and delays adjust accordingly.
Goal: Verify tracker detection works.
Note: Most websites won't have behavioral trackers, but the system should still scan.
-
Visit any website
-
Open DevTools Console
-
Look for tracker scan messages:
[Kala] Scanning page for trackers... [Kala] Found 0 potential trackers -
If a tracker is detected, you'll see:
[Kala] New tracker detected: BioCatch [Kala] Tracker detected, notifying service worker: BioCatch -
Check the popup - if trackers are detected, you'll see a "Trackers Detected" alert
✅ Success: Tracker scanning runs every 5 seconds, detections are logged.
Goal: Verify background service worker is running.
- Go to
brave://extensions(orchrome://extensions) - Find "Kala" in the list
- Click "service worker" link (or "Inspect views: service worker")
- A new DevTools window opens for the service worker
- Check the console for:
[Kala] Service worker script loaded [Kala] Service worker starting... [Kala] Service worker initialized successfully
✅ Success: Service worker console shows initialization logs.
Goal: Verify settings are saved and persist across page reloads.
- Open the popup
- Change privacy level to "High"
- Disable protection (toggle OFF)
- Reload the page (F5)
- Open popup again
- Settings should be remembered:
- Privacy level should still be "High"
- Protection should still be "OFF"
✅ Success: Settings persist across page reloads.
Goal: Verify extension doesn't cause noticeable lag.
- Open a website with a text input
- Type rapidly (e.g., type a sentence quickly)
- Observe:
- Text should appear with minimal delay (50-100ms per character)
- No freezing or stuttering
- Page remains responsive
✅ Success: Typing feels smooth, delays are barely noticeable.
Goal: Verify extension works independently per tab.
- Open two tabs with different websites
- In Tab 1: Enable protection, set privacy to "High"
- In Tab 2: Disable protection
- Type in both tabs
- Tab 1 should have delays, Tab 2 should not
✅ Success: Each tab has independent settings.
- Make sure DevTools Console is open (F12)
- Check that you're looking at the correct console (page console, not service worker console)
- Try refreshing the page
- Check popup - is protection enabled?
- Check console for errors
- Verify content script loaded: Look for
[Kala] Content script initialized
- Check if extension icon is visible in toolbar
- Try right-clicking icon → "Inspect popup"
- Check for errors in popup console
- Check service worker console for errors
- Verify Chrome storage permissions in manifest
- Check browser console for storage errors
| Feature | Expected Result |
|---|---|
| Event Interception | All keystrokes intercepted, logged, delayed |
| Delay Range | 30-150ms depending on privacy level |
| Event Ordering | Text appears in correct order |
| Context Detection | Delays adjust for gaming/form/search |
| Tracker Detection | Scans every 5 seconds, logs detections |
| Popup UI | Opens, shows current site, settings work |
| Settings Persistence | Settings saved across reloads |
| Performance | <2ms overhead, smooth typing |
If all tests pass, your extension is working correctly! 🎉
You can now:
- Use it on any website
- Customize privacy levels per site
- Monitor tracker detections
- Enjoy behavioral privacy protection!