test_user_suggestion_box.html doesn't check responses from the server
Categories
(Core :: DOM: Security, defect, P1)
Tracking
()
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.
Comment 1•3 years ago
|
||
Tomer, can you take care of this one please? Thank you!
Assignee | ||
Comment 3•3 years ago
•
|
||
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.
Assignee | ||
Comment 4•3 years ago
|
||
Comment 6•3 years ago
|
||
bugherder |
Description
•