Closed Bug 442323 Opened 16 years ago Closed 2 years ago

Automate litmus test for Litmus Testcase ID #5197 - Search: matching on name, completed file size, completed time, and referrer

Categories

(Toolkit :: Downloads API, defect)

defect
Not set
normal

Tracking

()

RESOLVED INCOMPLETE

People

(Reporter: poonaatsoc, Unassigned)

References

()

Details

Attachments

(1 file, 4 obsolete files)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9) Gecko/2008052906 Firefox/3.0
Build Identifier: Trunk

 

Reproducible: Always
Status: NEW → ASSIGNED
Assignee: nobody → poonaatsoc
Blocks: gsoc
Status: ASSIGNED → NEW
Status: NEW → ASSIGNED
Blocks: 442327
No longer blocks: gsoc
Attached patch v1.0 (obsolete) — Splinter Review
Attachment #328332 - Flags: review?(sdwilsh)
Comment on attachment 328332 [details] [diff] [review]
v1.0

This file suffers from lots of the same things mentioned in bug 443585 comment 2.  Please fix and make a new attachment.

But, I think this is already covered by http://mxr.mozilla.org/mozilla-central/source/toolkit/mozapps/downloads/tests/chrome/test_multiword_search.xul, which means that litmus test should be disabled, correct?
Attachment #328332 - Flags: review?(sdwilsh) → review-
(In reply to comment #2)
> (From update of attachment 328332 [details] [diff] [review])
> This file suffers from lots of the same things mentioned in bug 443585 comment
> 2.  Please fix and make a new attachment.

Man.  I must be having some serious issue with my editor.  Will fix it

> But, I think this is already covered by
> http://mxr.mozilla.org/mozilla-central/source/toolkit/mozapps/downloads/tests/chrome/test_multiword_search.xul,
> which means that litmus test should be disabled, correct?
> 

He hasn't covered 5, 6 and 7 in this link.  So should I cover only 5, 6 and 7?

https://litmus.mozilla.org/show_test.cgi?id=5197
You should add those cases to the existing test then.
Attached patch v2.0 (obsolete) — Splinter Review
Updated test_multiword_search.xul.  All the cases of the litmus cases covered including pasting the searcg string into the search box and pressing backspace into the search box.

Test run - Passes
Attachment #328332 - Attachment is obsolete: true
Attachment #330220 - Flags: review?(sdwilsh)
Attachment #330220 - Flags: review?(sdwilsh)
Review canceled, since synthesizeKey("VK_BACK_SPACE", {}, win); which was working a couple of days back, is not working now.
Attached patch v3.0 (obsolete) — Splinter Review
Test updated to accommodate the new utils.js.  The test passes
Attachment #330220 - Attachment is obsolete: true
Attachment #331483 - Flags: review?(sdwilsh)
Attachment #331483 - Flags: review?(sdwilsh)
Product: Firefox → Toolkit
Attached patch v4.0 (obsolete) — Splinter Review
Test updated.
Attachment #331483 - Attachment is obsolete: true
Attachment #335256 - Flags: review?(sdwilsh)
Comment on attachment 335256 [details] [diff] [review]
v4.0

>@@ -65,8 +73,7 @@ function test()
>            getService(Ci.nsIDownloadManager);
>   let db = dm.DBConnection;
> 
>-  // Empty any old downloads
>-  db.executeSimpleSQL("DELETE FROM moz_downloads");
>+  setCleanState();
You can get rid of the db bits there too (and likely the dm variable)

>@@ -116,6 +117,7 @@ function test()
>       let $ = function(aId) win.document.getElementById(aId);
>       let downloadView = $("downloadView");
>       let searchbox = $("searchbox");
>+      searchbox.focus();
not needed

>+        case 5:
>+          ok(downloadView.itemCount == 0, "No downloads listed for invalid search string");
>+
>+          synthesizeKey("VK_BACK_SPACE", {}, win);
Why are you doing a backspace here exactly?

>+        case 6:
>+          ok(downloadView.itemCount == 1, "1 download listed for valid search string after " +
>+            "carried out a backspace on the previous invalid search string");
>+
>+          // We paste a search string into the search box
>+          searchbox.value = "104 GB mozilla.org";
>+          synthesizeKey("a", {accelKey: true}, win);
>+          synthesizeKey("c", {accelKey: true}, win);
>+          synthesizeKey("v", {ctrlKey: true}, win);
Not really sure why this is like this, and it will also fail on mac at least.
This is testing basic functionality assumed to work by the widget.  Just remove it.
Attachment #335256 - Flags: review?(sdwilsh) → review-
Attached patch v5.0Splinter Review
Test updated to accomodate reviews.

In the final case for the searchbox focus, apparently even after the focuslistener is called with the focus event, the searchbox may/maynot have gained focus, so I wait for 2 more seconds before I carry out the backspace on the searchbox.
Attachment #335256 - Attachment is obsolete: true
Attachment #336890 - Flags: review?(sdwilsh)
Comment on attachment 336890 [details] [diff] [review]
v5.0

(In reply to comment #10)
> In the final case for the searchbox focus, apparently even after the
> focuslistener is called with the focus event, the searchbox may/maynot have
> gained focus, so I wait for 2 more seconds before I carry out the backspace on
> the searchbox.
What about calling executeSoon?  We shouldn't be using a timer if possible here
Attachment #336890 - Flags: review?(sdwilsh)

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)
Status: NEW → RESOLVED
Closed: 2 years ago
Flags: needinfo?(mak)
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: