Open
Bug 445197
Opened 18 years ago
Updated 4 years ago
Automate litmus test Testcase ID #4602 - Paused download - Search
Categories
(Toolkit :: Downloads API, defect)
Toolkit
Downloads API
Tracking
()
NEW
People
(Reporter: poonaatsoc, Unassigned)
References
()
Details
Attachments
(1 file, 5 obsolete files)
|
6.78 KB,
patch
|
sdwilsh
:
review-
|
Details | Diff | Splinter Review |
Proposed type of test: chrome
Proposed location of test: toolkit/mozapps/downloads/tests/chrome
| Reporter | ||
Comment 1•18 years ago
|
||
Attachment #329609 -
Flags: review?(sdwilsh)
Comment 2•18 years ago
|
||
Comment on attachment 329609 [details] [diff] [review]
v1.0
does this test pass? if so, please re-request review.
Attachment #329609 -
Flags: review?(sdwilsh)
| Reporter | ||
Comment 3•18 years ago
|
||
I have run the test. The test passes.
But I have a couple of questions. First thing I am using dummy download data. Second should I add a focus listener for the searchbox. Once the searchbox gains focus and the function is called, inside the function I continue with the tests.
Attachment #329609 -
Attachment is obsolete: true
Attachment #330187 -
Flags: review?(sdwilsh)
| Reporter | ||
Comment 4•18 years ago
|
||
utils.js issue solved. Patch updated now using the functions directly from utils.js. The test passes
Attachment #330187 -
Attachment is obsolete: true
Attachment #330344 -
Flags: review?(sdwilsh)
Attachment #330187 -
Flags: review?(sdwilsh)
| Reporter | ||
Comment 5•18 years ago
|
||
Test updated to accommodate the new utils.js. The test passes
Attachment #330344 -
Attachment is obsolete: true
Attachment #331480 -
Flags: review?(sdwilsh)
Attachment #330344 -
Flags: review?(sdwilsh)
Comment 6•18 years ago
|
||
Comment on attachment 331480 [details] [diff] [review]
v5.0
>+var ios = Cc["@mozilla.org/network/io-service;1"].getService(Ci.nsIIOService);
>+var dmFile = Cc["@mozilla.org/file/directory_service;1"].
>+ getService(Ci.nsIProperties).get("TmpD", Ci.nsIFile);
>+dmFile.append("dm-ui-test.file");
>+dmFile.createUnique(Ci.nsIFile.NORMAL_FILE_TYPE, 0666);
>+var gTestPath = ios.newFileURI(dmFile).spec;
s/var/let/
>+function runTest()
>+ let win = getDMWindow();
>+ if (win)
>+ win.close();
just use setCleanState();
>+ let richListItem = doc.getElementById("downloadView").children[0];
let's call this a download
>+ let searchbox = doc.getElementById("searchbox");
>+ searchbox.focus();
>+
>+ synthesizeKey("d", { }, win);
>+ synthesizeKey("o" ,{ }, win);
This is prone to failure since focus may not happen synchronously. Please do this like this test file:
http://mxr.mozilla.org/mozilla-central/source/toolkit/mozapps/downloads/tests/chrome/test_search_clearlist.xul#134
>+ let status = richListItem.getAttribute("status");
>+ ok(status.search(/Paused/i) != -1, "On entry of valid filename " +
This will fail on non en-us builds. I suggest getting the string from the properties file.
>+ synthesizeKey("VK_BACKSPACE", { }, win);
>+ synthesizeKey("VK_BACKSPACE", { }, win);
>+ status = richListItem.getAttribute("status");
>+ ok(status.search(/Paused/i) != -1, "On removal of the downloads " +
>+ "name from the searchbox, the paused download continues " +
>+ "to show the Paused -- [x] of [xxx] [MB/KB] string in its " +
>+ "status section");
Ditto
Attachment #331480 -
Flags: review?(sdwilsh) → review-
| Assignee | ||
Updated•18 years ago
|
Product: Firefox → Toolkit
| Reporter | ||
Comment 7•18 years ago
|
||
Patch updated to acccomodate reviews
Attachment #331480 -
Attachment is obsolete: true
Attachment #335158 -
Flags: review?(sdwilsh)
Comment 8•18 years ago
|
||
Comment on attachment 335158 [details] [diff] [review]
v6.0
>+ let pausedString = sb.getString("paused");
>+ pausedString = pausedString.substring(0,6);
This also is highly dependent on only en-us
Attachment #335158 -
Flags: review?(sdwilsh) → review-
| Reporter | ||
Comment 9•18 years ago
|
||
Test updated. Actually the litmus tests requires us to check the status of the download in the dm and not the download-monitor on the status bar. I have retrieved the relevant string from download.properties.
The property holds the string - "Paused - #". I have done a pausedString.substring(0,10) - which retrieves the string till the space just before the '#'. So this way it will be consistent with all languages since all updates to the download status is made after the '#' symbol.
Attachment #335158 -
Attachment is obsolete: true
Attachment #336668 -
Flags: review?(sdwilsh)
Comment 10•18 years ago
|
||
Comment on attachment 336668 [details] [diff] [review]
v7.0
(In reply to comment #9)
> The property holds the string - "Paused - #". I have done a
> pausedString.substring(0,10) - which retrieves the string till the space just
> before the '#'. So this way it will be consistent with all languages since all
> updates to the download status is made after the '#' symbol.
That is still dependent on English - right-to-left languages simply aren't going to work.
Looking at the bug this originally is from (bug 394263), we just need to check that it is not an empty status.
Attachment #336668 -
Flags: review?(sdwilsh) → review-
Comment 11•4 years ago
|
||
The bug assignee didn't login in Bugzilla in the last 7 months, so the assignee is being reset.
Assignee: poonaatsoc → nobody
Status: ASSIGNED → NEW
Updated•4 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•