Closed Bug 2006745 Opened 8 months ago Closed 4 months ago

AI Window Security Layer tests from xpcshell to mochitests

Categories

(Core :: Machine Learning: General, task)

task

Tracking

()

RESOLVED WONTFIX

People

(Reporter: rconcepcion, Unassigned)

References

Details

(Whiteboard: [genai])

Current security layer tests are xpcshell unit tests. Reviewer noted these are fine for initial check-in but should eventually be replaced with mochitests that exercise real browser behavior.

Scope

  • Keep xpcshell tests for pure utility functions (URL normalization, condition evaluation)
  • Add mochitests for integration behavior once AI Window integration begins, e.g.,
    • Ledger seeding from real page loads
    • Policy enforcement during tool execution
    • Tab lifecycle (navigation, close, restore)
    • TTL expiration in realistic scenarios

Notes

  • Blocked on AI Window integration landing in mozilla-central
  • Can remove low-value xpcshell tests (e.g., TabLedger basic ops) once mochitest coverage exists
  • Mochitests will catch real-world edge cases that unit tests miss

Reference

  • D274523 reviewer feedback (Greg)
  • Related: Bug 2005418 (test setup/teardown refactor)

Acceptance Criteria

  • Mochitests added for security layer integration with AI Window
  • Low-value xpcshell tests removed once mochitest coverage exists
  • TTL expiration tested without arbitrary setTimeout
Depends on: 2005754

Closing in favor of more recent security fast-follow bugs in Bug [2029713|https://bugzilla.mozilla.org/show_bug.cgi?id=2029713].

Status: NEW → RESOLVED
Closed: 4 months ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.