Closed Bug 1769786 Opened 3 years ago Closed 3 years ago

test_user_suggestion_box.html doesn't check responses from the server

Categories

(Core :: DOM: Security, defect, P1)

defect

Tracking

()

RESOLVED FIXED
103 Branch
Tracking Status
firefox103 --- fixed

People

(Reporter: standard8, Assigned: t.yavor)

References

(Blocks 1 open bug)

Details

(Whiteboard: [domsecurity-active])

Attachments

(1 file)

Implementing some fixes for ESLint, we noticed that dom/security/test/https-only/file_user_suggestion_box.sjs should be throwing an error because of an undefined function.

We are removing the function in bug 1769569.

One question that came up was about removing that if section, and doing some tests, I removed both if sections, and the test did not break. This makes me wonder if the test is actually testing what it was intended to.

Tomer, can you take care of this one please? Thank you!

Assignee: nobody → lyavor
Severity: -- → S3
Status: NEW → ASSIGNED
Flags: needinfo?(lyavor)
Priority: -- → P1
Whiteboard: [domsecurity-active]

Sure, I am on it

Flags: needinfo?(lyavor)

Found the reason for it.
That test case is testing that the error page is shown correct.
For that reason the test case requests something from a server that is not supporting https --> the error page gets displays since https-only can't upgrade it. The test is successful because the shown error page is correct.
But also since the browser never reached to the requested site everything in dom/security/test/https-only/file_user_suggestion_box.sjs won't get executed ever and is actually also not tested and arbitary.

So I guess we should consider to delete dom/security/test/https-only/file_user_suggestion_box.sjs and delete this line: https://searchfox.org/mozilla-central/source/dom/security/test/https-only/test_user_suggestion_box.html#26

Then we should be fine since there are other tests which test the correct behavior of the https-only error page.

Pushed by fbraun@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/f5a1c9036ed8 test_user_suggestion_box.html doesn't check responses from the server r=ckerschb
Regressions: 1772317
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 103 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: