Improve network callback event tests

Bug #1399195 reported by Chris Coulson on 2014-12-04
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Oxide
Medium
Chris Coulson

Bug Description

We have some tests for the various network callback events. However, there are some gaps in these tests:

- For onBeforeURLRequest, we load a HTML document with 2 subframes - one of these gets redirected in onBeforeURLRequest and the other one gets cancelled. Whilst we check the documentURI for each of the subframes, we don't check we get the appropriate main thread notifications when redirecting or cancelling the request for the main frame (eg, we should verify the sequence of events from WebView.loadEvent). We also don't test that isMainFrame works

- For onBeforeSendHeaders, we load some documents and verify the appropriate header overrides are applied. However, we only do this for the main frame, and don't ever verify isMainFrame. We also don't verify that cancelRequest() works, or verify we get the expected notifications from cancelling the request.

- For onBeforeRedirect, we load some documents and verify that we get the appropriate properties for each notification. In one case, the request is cancelled, but nowhere does the test actually verify that the request was really cancelled - the test doesn't check WebView.loadEvent and doesn't check the actual documentURI, so the test will still pass even if cancelRequest() is a noop

Changed in oxide:
importance: Undecided → Medium
status: New → Triaged
Changed in oxide:
milestone: none → branch-1.6
assignee: nobody → Chris Coulson (chrisccoulson)
Changed in oxide:
status: Triaged → In Progress
Changed in oxide:
milestone: branch-1.6 → branch-1.7
Changed in oxide:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers