Closed Bug 1321615 Opened 5 years ago Closed 5 years ago

(Re-)add tests for webrequest modifications of top level loads


(WebExtensions :: Request Handling, defect, P1)

51 Branch


(firefox53 fixed)

Tracking Status
firefox53 --- fixed


(Reporter: aswan, Assigned: mixedpuppy)



(1 file)

Bug 1314492 was a large refactoring of the webrequest tests.  But it also inadvertently dropped test coverage for blocking webrequest listeners that modify top level loads (or more specifically, loads without a loading principal).
Note that this is similar to but not the same as bug 1318800 which was just about passive listeners.
Attachment #8816241 - Flags: review?(aswan) → review?(kmaglione+bmo)
Comment on attachment 8816241 [details]
Bug 1321615 fix tests for header modification in toplevel loads,
Attachment #8816241 - Flags: review?(kmaglione+bmo) → review+
Pushed by
fix tests for header modification in toplevel loads, r=kmag
The curious thing about this failure is that it fails in a way that doesn't make sense.  We test for a valid array, then use array.find which throws undefined (log below).

I was unable to repro on try in comment 5, so I'm going to try re-landing this.  There has been some flux in the webrequest code, so the cause may have been addressed.

INFO - TEST-PASS | browser/components/extensions/test/browser/browser_ext_webRequest.js | valid responseHeaders array - 
INFO - Console message: [JavaScript Error: "headers.find(...) is undefined" {file: "moz-extension://9ccd484f-f7c2-48e0-b1af-863a1bb49c89/%7B9857a585-a039-4142-86cd-0140d50ab68a%7D.js" line: 128}]
INFO - checkHeaders@moz-extension://9ccd484f-f7c2-48e0-b1af-863a1bb49c89/%7B9857a585-a039-4142-86cd-0140d50ab68a%7D.js:128:19
Pushed by
fix tests for header modification in toplevel loads, r=kmag
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla53
Attachment #8816241 - Flags: review?(aswan)
Product: Toolkit → WebExtensions
You need to log in before you can comment on or make changes to this bug.