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

RESOLVED FIXED in Firefox 53

Status

defect
P1
normal
RESOLVED FIXED
3 years ago
11 months ago

People

(Reporter: aswan, Assigned: mixedpuppy)

Tracking

51 Branch
mozilla53

Firefox Tracking Flags

(firefox53 fixed)

Details

Attachments

(1 attachment)

Reporter

Description

3 years ago
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.
Comment hidden (mozreview-request)
Reporter

Updated

3 years ago
Attachment #8816241 - Flags: review?(aswan) → review?(kmaglione+bmo)

Comment 2

3 years ago
mozreview-review
Comment on attachment 8816241 [details]
Bug 1321615 fix tests for header modification in toplevel loads,

https://reviewboard.mozilla.org/r/97040/#review97264
Attachment #8816241 - Flags: review?(kmaglione+bmo) → review+

Comment 3

3 years ago
Pushed by mixedpuppy@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/4c343bdb6e2a
fix tests for header modification in toplevel loads, r=kmag
Comment hidden (mozreview-request)
Assignee

Comment 7

2 years ago
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

Comment 8

2 years ago
Pushed by mixedpuppy@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/3fa1db0853db
fix tests for header modification in toplevel loads, r=kmag

Comment 9

2 years ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/3fa1db0853db
Status: NEW → RESOLVED
Last Resolved: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla53
Reporter

Updated

2 years ago
Attachment #8816241 - Flags: review?(aswan)

Updated

11 months ago
Product: Toolkit → WebExtensions
You need to log in before you can comment on or make changes to this bug.