Closed Bug 1404888 Opened 8 years ago Closed 8 years ago

Migrate browser_webconsole_bug_762593_insecure_passwords_web_console_warning.js to the new frontend

Categories

(DevTools :: Console, defect, P1)

defect

Tracking

(firefox60 fixed)

RESOLVED FIXED
Firefox 60
Tracking Status
firefox60 --- fixed

People

(Reporter: nchevobbe, Assigned: nchevobbe)

References

Details

(Whiteboard: [newconsole-mvp])

Attachments

(1 file)

No description provided.
Priority: -- → P3
Priority: P3 → P2
Whiteboard: [newconsole-mvp]
Assignee: nobody → nchevobbe
Status: NEW → ASSIGNED
Priority: P2 → P1
Comment on attachment 8945037 [details] Bug 1404888 - Enable browser_webconsole_insecure_passwords_web_console_warning.js in new console frontend; . https://reviewboard.mozilla.org/r/215252/#review220902 Thanks! Some copy pasting between step 2 and 3 but the approach looks good. If try is green after fixing the last part, feel free to land without re-review. ::: devtools/client/webconsole/new-console-output/test/mochitest/browser_webconsole_insecure_passwords_web_console_warning.js:15 (Diff revision 1) > > const TEST_URI = "http://example.com/browser/devtools/client/webconsole/" + > - "test/test-bug-762593-insecure-passwords-web-" + > - "console-warning.html"; > -const INSECURE_PASSWORD_MSG = "Password fields present on an insecure " + > - "(http://) page. This is a security risk that allows user " + > + "new-console-output/test/mochitest/test-insecure-passwords-web-console-warning.html"; > +const TEST_URI_2 = "http://example.com/browser/devtools/client/webconsole/" + > + "new-console-output/test/mochitest/test-iframe-insecure-form-action.html"; > +const TEST_URI_3 = "https://example.com/browser/devtools/client/webconsole/" + TEST_URI_3 is the same as TEST_URI_2 ::: devtools/client/webconsole/new-console-output/test/mochitest/browser_webconsole_insecure_passwords_web_console_warning.js:41 (Diff revision 1) > - name: "Insecure iframe error displayed successfully", > - text: INSECURE_IFRAME_MSG, > - category: CATEGORY_SECURITY, > - severity: SEVERITY_WARNING > - }, > + hud = await openNewTabAndConsole(TEST_URI_3); > + message = await waitFor(()=> > + findMessage(hud, INSECURE_FORM_ACTION_MSG, ".message.warn"), "", 100); > + ok(message, "Insecure form action error displayed successfully"); > + await testLearnMoreLinkClick(message, INSECURE_PASSWORDS_URI); This is the same as the test for TEST_URI_2
Attachment #8945037 - Flags: review?(jdescottes) → review+
Comment on attachment 8945037 [details] Bug 1404888 - Enable browser_webconsole_insecure_passwords_web_console_warning.js in new console frontend; . https://reviewboard.mozilla.org/r/215252/#review220902 > TEST_URI_3 is the same as TEST_URI_2 TEST_URI_3 is https, TEST_URI_2 is http > This is the same as the test for TEST_URI_2 not really, we wait for INSECURE_FORM_ACTION message (INSECURE_IFRAME_MSG in TEST_URI_2)
Comment on attachment 8945037 [details] Bug 1404888 - Enable browser_webconsole_insecure_passwords_web_console_warning.js in new console frontend; . https://reviewboard.mozilla.org/r/215252/#review220952 ::: devtools/client/webconsole/new-console-output/test/mochitest/browser_webconsole_insecure_passwords_web_console_warning.js:15 (Diff revision 1) > > const TEST_URI = "http://example.com/browser/devtools/client/webconsole/" + > - "test/test-bug-762593-insecure-passwords-web-" + > - "console-warning.html"; > -const INSECURE_PASSWORD_MSG = "Password fields present on an insecure " + > - "(http://) page. This is a security risk that allows user " + > + "new-console-output/test/mochitest/test-insecure-passwords-web-console-warning.html"; > +const TEST_URI_2 = "http://example.com/browser/devtools/client/webconsole/" + > + "new-console-output/test/mochitest/test-iframe-insecure-form-action.html"; > +const TEST_URI_3 = "https://example.com/browser/devtools/client/webconsole/" + My bad! I did read several times so I think it couldn't hurt to make the difference more obvious. With meaningful names maybe? Same for the tests below, they're so similar that the boilerplate code makes it hard to spot differences. Mutualize in a test function where we just pass the URI and expected message?
Good ideas, i'll rename constants and use a generic function.
Comment on attachment 8945037 [details] Bug 1404888 - Enable browser_webconsole_insecure_passwords_web_console_warning.js in new console frontend; . Clearing review flag since things changed a bit
Attachment #8945037 - Flags: review+ → review?(jdescottes)
Comment on attachment 8945037 [details] Bug 1404888 - Enable browser_webconsole_insecure_passwords_web_console_warning.js in new console frontend; . That looks great! Sorry for misreading the first patch, but in the end I'm glad we are landing this version, thanks!
Attachment #8945037 - Flags: review?(jdescottes) → review+
Pushed by nchevobbe@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/3e4b0027e470 Enable browser_webconsole_insecure_passwords_web_console_warning.js in new console frontend; r=jdescottes.
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 60
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: