• David Van Cleve's avatar
    Trust Tokens: Add more browser tests covering redemption · 4d7ced21
    David Van Cleve authored
    This change expands the Trust Tokens browser tests to cover additional
    redemption-related cases:
    
    redemption to issuer with no tokens -> expect error
    redemption after successful issuance, to other issuer -> expect error
    redemption after successful issuance, against same issuer
      -> should handle server error, failing the operation
    successful issuance, redemption, another redemption
      -> should hit SRR cache
    successful issuance, redemption, issuer-prompted refresh
      -> should execute redemption despite SRR cache
    successful issuance, redemption, refresh prompted from non-issuer
      context -> should error
    
    issuance from origins A+B, cors mode redemption to origin A, redirect to
    origin B
      -> redemption succeeds, using origin B as issuer
    issuance from origin A yielding exactly 1 token, cors mode redemption to
    origin A, redirect to origin A
      -> redemption succeeds (same token is sent)
    issuance from origin A, no-cors mode redemption to origin A, redirect to
    origin B
      -> redemption succeeds, obtain origin A SRR
    
    A prior change (crrev.com/c/2308860) expanded coverage by adding more
    issuance-related tests; a subsequent change will add more signing tests.
    
    Bug: 1071293
    Change-Id: Iaa654c99162dbaa735b3b9fe2e3aad359e9c27ce
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2309007
    Commit-Queue: David Van Cleve <davidvc@chromium.org>
    Reviewed-by: default avatarCharlie Harrison <csharrison@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#805485}
    4d7ced21
trust_token_browsertest.cc 44.9 KB