Closed
Bug 442436
Opened 17 years ago
Closed 3 years ago
Automate litmus test Testcase ID #5282 - "Clear List" button - removal functionality
Categories
(Toolkit :: Downloads API, defect)
Toolkit
Downloads API
Tracking
()
RESOLVED
INCOMPLETE
People
(Reporter: poonaatsoc, Unassigned)
References
()
Details
Proposed type of test: chrome
Proposed location of test: toolkit/mozapps/downloads/tests/chrome
Comment 1•17 years ago
|
||
This should actually be split into three different tests:
(1) xpcshell in toolkit/components/downloads/test/unit
Tests that nsIDownloadManager::cleanup() only clears completed, canceled, and failed downloads.
(2) chrome in toolkit/mozapps/downloads/tests/chrome
Tests that clearing the list while the list is building actually clears the list
(3) chrome in toolkit/mozapps/downloads/tests/chrome
Tests that when the ui receives the observer topic "download-manager-remove-download" with a null subject that it rebuilds the whole list. Bonus points if this test also checks that a download is removed if it is in the subject.
![]() |
Reporter | |
Comment 2•17 years ago
|
||
> (2) chrome in toolkit/mozapps/downloads/tests/chrome
> Tests that clearing the list while the list is building actually clears the
> list
For this should I do follow this sequence -
- Update the db
- Show the dm ui
- And now press the clear list button
or
- Show the dmui
- Update the dm db with download data(expecting that the process of updating
the db is async)
- And now press the clearlist button
> (3) chrome in toolkit/mozapps/downloads/tests/chrome
> Tests that when the ui receives the observer topic
> "download-manager-remove-download" with a null subject that it rebuilds the
> whole list.
This topic is generated when I do a remove from list on a download richlistitem, right? And to implement this - say I have updated the db with 1 active download, 1 pause one and 1 cancelled one and 1 finished one. So now if I do a remove from list for the finished one, the listener is called for "download-manager-remove-download" topic inside which I can do a check if the no of size of the richlistbox is 3?
>Bonus points if this test also checks that a download is removed
> if it is in the subject.
Wait a sec. What does the subject actually hold? You previous sentence had null. Looks like I have misconstrued the call of "download-manager-remove-download"
And also I gave a search at mxr.mozilla.org for the above topic. I couldn't find this statement in the codebase
Comment 3•17 years ago
|
||
(In reply to comment #2)
> For this should I do follow this sequence -
> - Update the db
> - Show the dm ui
> - And now press the clear list button
This one.
> This topic is generated when I do a remove from list on a download
> richlistitem, right? And to implement this - say I have updated the db with 1
> active download, 1 pause one and 1 cancelled one and 1 finished one. So now if
> I do a remove from list for the finished one, the listener is called for
> "download-manager-remove-download" topic inside which I can do a check if the
> no of size of the richlistbox is 3?
No, the topic is generated when the cleanup runs in the download manager. For testing purposes, you just need to dispatch that observer topic though.
> Wait a sec. What does the subject actually hold? You previous sentence had
> null. Looks like I have misconstrued the call of
> "download-manager-remove-download"
See http://mxr.mozilla.org/mozilla-central/source/toolkit/mozapps/downloads/content/downloads.js#490
Assignee | ||
Updated•17 years ago
|
Product: Firefox → Toolkit
Comment 4•4 years ago
|
||
The bug assignee didn't login in Bugzilla in the last 7 months.
:mak, could you have a look please?
For more information, please visit auto_nag documentation.
Assignee: poonaatsoc → nobody
Status: ASSIGNED → NEW
Flags: needinfo?(mak)
Updated•3 years ago
|
Status: NEW → RESOLVED
Closed: 3 years ago
Flags: needinfo?(mak)
Resolution: --- → INCOMPLETE
You need to log in
before you can comment on or make changes to this bug.
Description
•