error: TEST FAILED: test-xhr.testResponseHeaders (failure)

RESOLVED FIXED

Status

defect
P1
normal
RESOLVED FIXED
7 years ago
7 years ago

People

(Reporter: KWierso, Assigned: KWierso)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

Assignee

Description

7 years ago
Something in the private-browsing stuff that just landed today broke a test:

error: TEST FAILED: test-xhr.testResponseHeaders (failure)
error: fail: XHR's headers are valid ("Content-Type: text/plain\r\nContent-Length: 2697\r\n" != "Content-Type: text/plain\r\n")
info: Traceback (most recent call last):
  File "resource://1ac4ecd0-f3b6-4421-9a55-b2233f91bec4-at-jetpack/api-utils/lib/xhr.js", line 121, in null
    self._orsc.apply(self, arguments);
  File "resource://1ac4ecd0-f3b6-4421-9a55-b2233f91bec4-at-jetpack/api-utils/tests/test-xhr.js", line 67, in null
    "XHR's headers are valid");
  File "resource://1ac4ecd0-f3b6-4421-9a55-b2233f91bec4-at-jetpack/api-utils/lib/unit-test.js", line 164, in assertEqual
    this.fail(message);
  File "resource://1ac4ecd0-f3b6-4421-9a55-b2233f91bec4-at-jetpack/api-utils/lib/unit-test.js", line 71, in fail
    this.console.trace();
Assignee

Comment 1

7 years ago
Hrm, actually, looks like this broke on the Firefox side...

Something in https://tbpl.mozilla.org/?noignore=1&tree=Mozilla-Inbound&jobname=jetpack&rev=1b3fa4309f31
or https://tbpl.mozilla.org/?noignore=1&jobname=jetpack&rev=118cc431d56f broke it. Bug 783562 seems likely.
Assignee: evold → nobody
Blocks: 783562
Assignee

Comment 2

7 years ago
Misread it again, this looks much more like bug 782342. 

With Content-Length now always being sent, the test just needs to be updated to account for that.

I should be able to get the test fixed in a few hours when I get in to the office today.
Assignee: nobody → kwierso
Blocks: 782342
No longer blocks: 783562
Assignee

Comment 3

7 years ago
Posted patch Ignore Content-Length header (obsolete) — Splinter Review
So, this strips off the end of the received headers making the test ignore the newly added Content-Length header because calculating the file-size of the file the test ended up being horribly complicated.

I'm all for having a better fix than this, but this gets tests passing again for now.
Attachment #656398 - Flags: review?(dtownsend+bugmail)
Assignee

Comment 4

7 years ago
So this is similar to my previous patch, but it applies the same technique for all versions of Firefox, reducing the length of the test.
Attachment #656398 - Attachment is obsolete: true
Attachment #656398 - Flags: review?(dtownsend+bugmail)
Attachment #656401 - Flags: review?(dtownsend+bugmail)
Attachment #656401 - Flags: review?(dtownsend+bugmail) → review+

Comment 5

7 years ago
Commit pushed to master at https://github.com/mozilla/addon-sdk

https://github.com/mozilla/addon-sdk/commit/ca0d88e87feabf4258c396927aa2f0050d06337c
Fix bug 786399 by ignoring the new mandatory Content-Length header

Updated

7 years ago
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Assignee

Comment 6

7 years ago
Pushed to inbound to fix the tests there:
https://hg.mozilla.org/integration/mozilla-inbound/rev/338e6a97f0de
You need to log in before you can comment on or make changes to this bug.