Closed Bug 373253 Opened 19 years ago Closed 18 years ago

Initial addition of test framework and tests for pwmgr

Categories

(Toolkit :: Password Manager, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: Dolske, Assigned: Dolske)

References

Details

Attachments

(2 files, 2 obsolete files)

This is the initial step of adding pwmgr to the Mochitest framework, as well as the first batch of tests. [More will follow.]
Attached patch Draft patch (obsolete) — Splinter Review
Notes: * Added |AddUserFull2| to internal pwmgr API, so that the test framework can create logins with an associated actionURL. [During normal operation, pwmgr just jams the actionURL directly into it's in-memory table, and them dumps it to disk.] Slightly hacky, but good enough until the JS rewrite lands... * 227670 fails, because the current "autocomplete=off" support only disables *saving* logins, but not filling in existing logins. Is this desired? * 257781 fails because XPCOM throws a NS_ERROR_XPC_BAD_OP_ON_WN_PROTO. I'll file a bug on this. [Looks like a problem with executing a onsubmit handler from a timeout.] * 270558 fails in a weird edge case. [Form has a prefilled password -- but not username -- and the password differs from the single matching stored login. Pwmgr will fill in the known login, and clobber the prefilled password]. I'm not sure this is a realistic use scenario. The test should either be changed to expect the current way pwmgr works, or become a todo() test. * There are a few minor "TODO" comments in the test that I'll probably just remove and handle in future tests.
Oops, also: * 358853 should probably be deferred. A closer examination of the bugs involved makes it look like it's kind of complex to reproduce, and the existing test case is too simplistic.
Depends on: 373261
(In reply to comment #1) > * 227670 fails, because the current "autocomplete=off" support only disables > *saving* logins, but not filling in existing logins. Is this desired? That's bug 362576.
OS: Mac OS X → All
Hardware: PC → All
Attached patch Review-ready patch (obsolete) — Splinter Review
Cleaned up tests. Everything passes on my trunk build. There are a few todos for edge cases that the current pwmgr doesn't handle ideally, but their weird enough that I'd classify them more as "implementation details" and not bugs.
Attachment #257892 - Attachment is obsolete: true
Attachment #262104 - Flags: review?(sayrer)
Comment on attachment 262104 [details] [diff] [review] Review-ready patch These look good, except for the nit that the JS seems to be indented with tabs. I don't happen to care, but most people do. Two-space indent is the norm.
Attachment #262104 - Flags: review?(sayrer) → review+
Attached patch Final patchSplinter Review
Changed indenting to 2-spaces, and added a few more comments to describe tests. Otherwise the save as the r+ patch.
Attachment #262104 - Attachment is obsolete: true
Attachment #262187 - Flags: superreview?(benjamin)
Comment on attachment 262187 [details] [diff] [review] Final patch sr=mconnor on the non-test stuff, since that's all I looked at (and all that was needed).
Attachment #262187 - Flags: superreview?(benjamin) → superreview+
Checking in netwerk/base/public/nsIPasswordManagerInternal.idl; /cvsroot/mozilla/netwerk/base/public/nsIPasswordManagerInternal.idl,v <-- nsIPasswordManagerInternal.idl new revision: 1.7; previous revision: 1.6 done Checking in toolkit/components/passwordmgr/Makefile.in; /cvsroot/mozilla/toolkit/components/passwordmgr/Makefile.in,v <-- Makefile.in new revision: 1.2; previous revision: 1.1 done Checking in toolkit/components/passwordmgr/base/nsPasswordManager.cpp; /cvsroot/mozilla/toolkit/components/passwordmgr/base/nsPasswordManager.cpp,v <-- nsPasswordManager.cpp new revision: 1.94; previous revision: 1.93 done RCS file: /cvsroot/mozilla/toolkit/components/passwordmgr/test/Makefile.in,v done Checking in toolkit/components/passwordmgr/test/Makefile.in; /cvsroot/mozilla/toolkit/components/passwordmgr/test/Makefile.in,v <-- Makefile.in initial revision: 1.1 done RCS file: /cvsroot/mozilla/toolkit/components/passwordmgr/test/pwmgr_common.js,v done Checking in toolkit/components/passwordmgr/test/pwmgr_common.js; /cvsroot/mozilla/toolkit/components/passwordmgr/test/pwmgr_common.js,v <-- pwmgr_common.js initial revision: 1.1 done RCS file: /cvsroot/mozilla/toolkit/components/passwordmgr/test/test_0init.html,v done Checking in toolkit/components/passwordmgr/test/test_0init.html; /cvsroot/mozilla/toolkit/components/passwordmgr/test/test_0init.html,v <-- test_0init.html initial revision: 1.1 done RCS file: /cvsroot/mozilla/toolkit/components/passwordmgr/test/test_basic_form.html,v done Checking in toolkit/components/passwordmgr/test/test_basic_form.html; /cvsroot/mozilla/toolkit/components/passwordmgr/test/test_basic_form.html,v <-- test_basic_form.html initial revision: 1.1 done RCS file: /cvsroot/mozilla/toolkit/components/passwordmgr/test/test_basic_form_0pw.html,v done Checking in toolkit/components/passwordmgr/test/test_basic_form_0pw.html; /cvsroot/mozilla/toolkit/components/passwordmgr/test/test_basic_form_0pw.html,v <-- test_basic_form_0pw.html initial revision: 1.1 done RCS file: /cvsroot/mozilla/toolkit/components/passwordmgr/test/test_basic_form_1pw.html,v done Checking in toolkit/components/passwordmgr/test/test_basic_form_1pw.html; /cvsroot/mozilla/toolkit/components/passwordmgr/test/test_basic_form_1pw.html,v <-- test_basic_form_1pw.html initial revision: 1.1 done RCS file: /cvsroot/mozilla/toolkit/components/passwordmgr/test/test_basic_form_2pw_1.html,v done Checking in toolkit/components/passwordmgr/test/test_basic_form_2pw_1.html; /cvsroot/mozilla/toolkit/components/passwordmgr/test/test_basic_form_2pw_1.html,v <-- test_basic_form_2pw_1.html initial revision: 1.1 done RCS file: /cvsroot/mozilla/toolkit/components/passwordmgr/test/test_basic_form_2pw_2.html,v done Checking in toolkit/components/passwordmgr/test/test_basic_form_2pw_2.html; /cvsroot/mozilla/toolkit/components/passwordmgr/test/test_basic_form_2pw_2.html,v <-- test_basic_form_2pw_2.html initial revision: 1.1 done RCS file: /cvsroot/mozilla/toolkit/components/passwordmgr/test/test_basic_form_3pw_1.html,v done Checking in toolkit/components/passwordmgr/test/test_basic_form_3pw_1.html; /cvsroot/mozilla/toolkit/components/passwordmgr/test/test_basic_form_3pw_1.html,v <-- test_basic_form_3pw_1.html initial revision: 1.1 done RCS file: /cvsroot/mozilla/toolkit/components/passwordmgr/test/test_bug_221634.html,v done Checking in toolkit/components/passwordmgr/test/test_bug_221634.html; /cvsroot/mozilla/toolkit/components/passwordmgr/test/test_bug_221634.html,v <-- test_bug_221634.html initial revision: 1.1 done RCS file: /cvsroot/mozilla/toolkit/components/passwordmgr/test/test_bug_227640.html,v done Checking in toolkit/components/passwordmgr/test/test_bug_227640.html; /cvsroot/mozilla/toolkit/components/passwordmgr/test/test_bug_227640.html,v <-- test_bug_227640.html initial revision: 1.1 done RCS file: /cvsroot/mozilla/toolkit/components/passwordmgr/test/test_bug_242956.html,v done Checking in toolkit/components/passwordmgr/test/test_bug_242956.html; /cvsroot/mozilla/toolkit/components/passwordmgr/test/test_bug_242956.html,v <-- test_bug_242956.html initial revision: 1.1 done RCS file: /cvsroot/mozilla/toolkit/components/passwordmgr/test/test_bug_270558.html,v done Checking in toolkit/components/passwordmgr/test/test_bug_270558.html; /cvsroot/mozilla/toolkit/components/passwordmgr/test/test_bug_270558.html,v <-- test_bug_270558.html initial revision: 1.1 done RCS file: /cvsroot/mozilla/toolkit/components/passwordmgr/test/test_bug_360493_1.html,v done Checking in toolkit/components/passwordmgr/test/test_bug_360493_1.html; /cvsroot/mozilla/toolkit/components/passwordmgr/test/test_bug_360493_1.html,v <-- test_bug_360493_1.html initial revision: 1.1 done RCS file: /cvsroot/mozilla/toolkit/components/passwordmgr/test/test_bug_360493_2.html,v done Checking in toolkit/components/passwordmgr/test/test_bug_360493_2.html; /cvsroot/mozilla/toolkit/components/passwordmgr/test/test_bug_360493_2.html,v <-- test_bug_360493_2.html initial revision: 1.1 done
Status: NEW → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
Oops, I spoke too soon. Changes to this "internal interface" cause bustage in multiple projects. That's right, to check this patch in, you need to build SeaMonkey and Thunderbird.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Doh.
ok, this is FIXED, but the test for bug 221634 won't work cross-platform. I filed bug 378416 as a follow-up.
Status: REOPENED → RESOLVED
Closed: 18 years ago18 years ago
Depends on: 378416
No longer depends on: 373261
Resolution: --- → FIXED
Product: Firefox → Toolkit
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: