Closed Bug 644288 Opened 14 years ago Closed 14 years ago

Make HashCompleter tests

Categories

(Toolkit :: Safe Browsing, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: mmm, Assigned: mmm)

Details

Attachments

(1 file, 2 obsolete files)

As part of an overall goal to port HashCompleter to JS, it would be nice to have tests for the HashCompleter interface to ensure that we don't mess anything up as we bring it to JS.
Attached patch WIP tests. (obsolete) — Splinter Review
Looks like I finally have all the functionality that I want to test. Still missing some bits but they don't seem essential.
Attached patch Tests for HashCompleter. (obsolete) — Splinter Review
This tests a few parts but leaves some out. Tests: - HashCompleter getting a 204 response - HashCompleter handling duplicate responses - multiple responses for the same hash prefix - random data (to test large requests) Stuff not tested: - multiple requests at the same time - backoff rate correctly being handled by the spec - requests with a MAC As for multiple requests and the backoff rate, it looks like we could later add a test for multiple requests and if we exposed some data related to the next scheduled request, perhaps add a test for the backoff rate. I'm not completely sure how to test requests with a MAC mainly because I haven't worked on re-implementing that bit yet. Are MACs even used with the current safebrowsing?
Attachment #522816 - Attachment is obsolete: true
Attachment #523187 - Flags: review?(dcamp)
Sorry, forgot to refresh before diff'ing. Confirmed that this is the correct version I want reviewed :)
Attachment #523187 - Attachment is obsolete: true
Attachment #523187 - Flags: review?(dcamp)
Attachment #523213 - Flags: review?(dcamp)
Comment on attachment 523213 [details] [diff] [review] Correct version of tests. Looks good. Eventually you might want to include some tests of the client key interaction. test_streamupdater.js has some hmac stuff you should be able to crib from.
Attachment #523213 - Flags: review?(dcamp) → review+
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
An intermittent orange has shown up with this test. Bug 652294
Product: Firefox → Toolkit
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: