Closed Bug 1573399 Opened 5 years ago Closed 4 years ago

Add missing test cases to browser_aboutNetError.js

Categories

(Firefox :: Security, task, P3)

task

Tracking

()

RESOLVED FIXED
89 Branch
Tracking Status
firefox89 --- fixed

People

(Reporter: johannh, Assigned: snehasai01, Mentored)

References

Details

Attachments

(1 file, 1 obsolete file)

We are removing https://searchfox.org/mozilla-central/source/testing/firefox-ui/tests/functional/security/test_ssl_disabled_error_page.py and there are a few assertions that we're not covering in browser_aboutNetError.js (such as the page title etc.), it would be good to eventually have that covered by mochitests, too.

It seems that I'm encountering an error on firefox Nigthly about an ssl_error_page.
"No strings exist for this error type" aboutNetError.js
appear on trying to load an iframe !

Hello Johann, may I be assigned this bug?

Sure! You can still find the old test on the ESR68 repo: https://searchfox.org/mozilla-esr68/rev/d83457a5802f66c8790b0fb6165c4320f8e261e9/testing/firefox-ui/tests/functional/security/test_ssl_disabled_error_page.py#43

You should ensure that all the assertions from that test are also done somewhere in browser_aboutNetError.js

Thanks!

Assignee: nobody → stormie.arroyo
Status: NEW → ASSIGNED

Hello Johann, I'm trying to warp my head around the logic that needs to be done here. I see that there are:
-self.assertRaises...
-self.assertEquals...

  • self.assertIn...
    -self.assertIn...
    a total of (4) assertions in the old ESR68 repo file. In browser_aboutNetError.js, does each assertion need its own task?

(In reply to Lupita Arroyo from comment #4)

Hello Johann, I'm trying to warp my head around the logic that needs to be done here. I see that there are:
self.assertRaises...
self.assertEquals...
self.assertIn...
self.assertIn...
a total of (4) assertions in the old ESR68 repo file. In browser_aboutNetError.js, does each assertion need its own task?

I think the task is actually easier than you think, there's already a test in browser_aboutNetError.js that does almost the same thing:
https://searchfox.org/mozilla-esr68/rev/0ef234279fd0608a8fd6bb1f792d080087d638d8/browser/base/content/test/about/browser_aboutNetError.js#8

It loads a TLS error and asserts that there's a "prefResetButton", which is the same thing the Python test did.

What's missing from the JS test are these:

# Verify "Secure Connection Failed" error page title

and

# Verify the error message is correct

So maybe we should add them to that task for the sake of preserving code coverage :)

Thanks!

Lupita, are you still looking into this?

Flags: needinfo?(stormie.arroyo)
Assignee: stormie.arroyo → nobody
Mentor: prathikshaprasadsuman
Status: ASSIGNED → NEW

may I be assigned this bug?

Assignee: nobody → snehasai01
Status: NEW → ASSIGNED
Flags: needinfo?(stormie.arroyo)
Summary: Port assertions from test_ssl_disabled_error_page.py to browser_aboutNetError.js → Add missing test cases to browser_aboutNetError.js
Attachment #9211727 - Attachment is obsolete: true
Pushed by prathikshaprasadsuman@gmail.com: https://hg.mozilla.org/integration/autoland/rev/784bb554a994 Add missing test cases to browser_aboutNetError.js. r=prathiksha
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 89 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: